osVFS ===== This provides an application level virtual file system (VFS) for Python with an API almost identical to the Python os module. For 99% of all Python applications, the only modifications required to use a VFS are to replace os and open with your vfs as follows; import vfs; os=vfs.fakeroot_filesystem(os,'/tmp') # replace with vfs of your choice open=os.file Note that it is preferable to use os.file() instead of open() when possible, as this clarifys which filesystem you are opening the file from. Problems with protocols ======================= Proper VFS requires fetching of mtimes, symbolic links, inodes (for mirroring of hardlinks only), and directorys. It is also handy to be able to obtain sizes. It is possible to simply fetch and cache directory listings, but unfortunately these are formatted differently for different protocols, so they will need to be translated. Much of the low-level posix filesystem interface relies on meaningful device/inode numbers. However, most of the Python os API can be implemented without them, instead dummy numbers are used by things like os.stat(). ftp: much info can only be retrieved by directory listings, but fortunately these are systematicly structured for easy parsing and interpretation. Some info can be obtained by special ftp commands (size, mtime?), but these are not always supported. The sad news is talking through a http proxy means you are actualy using http, and hence get the crippled http listings (see below). http: some info can be extracted from directory listings, but these are painfuly html formated, and different httpds/proxys format them differently. http traditionaly supports fetching of metadata through "HEAD" fetches, but all desired attributes are not required to be sent. I'm not sure that all info can always be fetched, making true mirroring not always possible. Particularly tricky is symbolic links... rsync: rsync is built for mirroring, but that doesn't necisarily mean dynamic mirroring. rsync will fetch files and build directory structures, with full support for symbolic and hard links. However, I'm not sure it can be used to fetch directory listings or file attributes without fetching the whole file. This means it cannot be used to fetch directory listings only. UPDATE: looks like rsync can be used for listing remote files... checking it out soon. webDAV: good potential. Extends http to include all the info that is missing for a VFS, then adds some. rsync over http: as defined/used by rproxy. nice. Can user client-side delta calculation without changing the protocol. Other: not widely used.