[Twisted-Python] Re: [Twisted-commits] r14589 - finally add readChunk, writeChunk to ivfs.IFileSystemLeaf 's interface

Jp Calderone exarkun at divmod.com
Wed Sep 28 19:21:13 EDT 2005


On Wed, 28 Sep 2005 11:48:32 -0600, Andy Gayton <andy at wolfwood.twistedmatrix.com> wrote:
>Author: andy
>Date: Wed Sep 28 11:48:31 2005
>New Revision: 14589
>
>Modified:
>   trunk/twisted/vfs/ivfs.py
>Log:
>finally add readChunk, writeChunk to ivfs.IFileSystemLeaf 's interface
>
>Modified: trunk/twisted/vfs/ivfs.py
>==============================================================================
>--- trunk/twisted/vfs/ivfs.py	(original)
>+++ trunk/twisted/vfs/ivfs.py	Wed Sep 28 11:48:31 2005
>@@ -46,6 +46,18 @@
>     def close(self):
>         """closes this node"""
>
>+    def readChunk(self, offset, length):
>+        """
>+        Leaf should have been previously opened with suitable flags.
>+        Reads length bytes or until the end of file from this leaf from
>+        the given offset.
>+        """
>+
>+    def writeChunk(self, offset, data):
>+        """
>+        Leaf should have been previously opened with suitable flags.
>+        Writes data to leaf from the given offset.
>+        """
>

It bothers me that this API differs from stable API for moving piles of bytes, the *other* somewhat controversial newly introduced API for moving piles of bytes around, and the third API being toyed with which is also for moving piles of bytes around.

To all the VFS hackers, could we put some effort into not introducing a fourth API? 

Jp




More information about the Twisted-Python mailing list