[Twisted-Python] FTP / Common VFS Layer

Andrew Bennetts andrew-twisted at puzzling.org
Thu Apr 21 22:37:34 EDT 2005

On Fri, Apr 22, 2005 at 01:47:33AM +0000, Jp Calderone wrote:
> On Fri, 22 Apr 2005 11:23:44 +1000, Andrew Bennetts wrote:
> >
> >So, I don't think it's too early to start improving the IFTPShell stuff
> >(which I had been consciously ignoring until now).  The other work that
> >needs doing shouldn't tend to get in the way very much, because the basics
> >have been fixed.
>  I think a good direction to take with IFTPShell is to drop it entirely and 
>  use an entirely new and different interface.  If anyone complains about 
>  compatibility later (which no one will because ftp was too broken to use 
>  until the work you did on it, and the interface is too specific to have 
>  been usefully implemented differently anyway), we can always write an 
>  adapter from the new to the old.

Yeah.  I'm not at all concerned about backwards-compatibility for code that
never worked.

>  Using something like, say, IResource would be interesting, but I guess 
>  IResource isn't quite expressive enough to satisfy all the requirements.

IResource lacks quite a lot in terms of a read/write filesystem with
metadata like modification times and permission bits.  In the Twisted tree,
something like twisted.conch.interfaces.ISFTPServer (as implemented by e.g.
twisted.conch.unix.SFTPServerForUnixConchUser) is much closer to what FTP
needs.  I think the VFS stuff is closer again.

I think there may be some point in having an IFTPShell-like interface that
maps closely to what the FTP protocol needs, and adapters to map VFS stuff
(and even IResource for simple read-only trees) to that, but I haven't
thought deeply about it.


More information about the Twisted-Python mailing list