[Twisted-Python] Re: +AFs-Twisted-Python+AF0- twisted.ftp status, and metadatafs

Benjamin Bruheim grolgh at online.no
Sat Sep 1 14:31:11 EDT 2001

+AD4- Take a look at Medusa (www.nightmare.com/medusa) VFS as an example of
+AD4- how +ACo-not+ACo- to do it. One thing I learned from it - string paths are EVIL,
+AD4- especially in FTP where paths such as /baz/.././//foo/../bar are legal.
+AD4- Paths should therefore be represented by lists, e.g. +AFs-'baz', 'foo', 'bar'+AF0-.

Yes, I figured :) I made the same mistake when writing my first vfs draft +AFs-1+AF0- some time ago. At least it got mount.

+AD4- The next problem is that it's usually hard to know if the last item is a
+AD4- file or a folder (if the path is '/foo/bar', is 'bar' a file or a
+AD4- folder?). In systems like Zope it's even harder since an object can
+AD4- function as both.

Useful for a zip-fs :) My gut-reaction would say that '/foo/bar' is a file, '/foo/bar/' is a directory. In ftp this is a matter of having a client which can handle it (but it will without doubt create problems on +AF8-many+AF8- clients), most of the trouble is solved through context 'RETR +ADw-file+AD4-' vs 'CD +ADw-dir+AD4-'+ADs- but it wont solve 'SITE CHMOD +ADw-path+AD4-' (not implemented :P ). Such cases will create problems, but this is due to badly specified protocols. PB won't have this problem +ADs-)

+AD4- I would suggest you get a WebDAV implementation going before you (or any
+AD4- other interested party) start working on a VFS layer. WebDAV is more
+AD4- generic (it support +ACI-collections+ACI-, not +ACI-folders+ACI-), supports arbitary
+AD4- properties on objects (metadata), etc.. And supporting two different
+AD4- systems will amke sure you don't make any protocol specific design
+AD4- decisions (such as Medusa's VFS, where it passes the VFS the path string
+AD4- specified by the user, so the VFS must deal with '..', './../foo//bar'
+AD4- and all that crap.)

Two different systems? You mean WebDAV and a FTP? Yes, it sounds interesting, though I have to read a bit more on it to understand WebDAV's concept. It seems to fill most of the requirements. The VFS will maybe be just a storage-specific layer, while WebDAV is built on top of it. I need to read on it before I try to fill in anything more. :)

+AFs-1+AF0-: http://www.twistedmatrix.com/users/phed/vfs.py

More information about the Twisted-Python mailing list