As of Tcl 8.4a3 (and in Tcl 8.4a4 heavily debugged), Tcl's filesystem is completely 'virtual filesystem aware'. What this means is that in principle you can divert ''all desired'' filesystem activity away from the native operating system and to something else. In practice what this means is that, given appropriate extensions, ordinary Tcl code can operate on remote files (on ftp sites or over a http connection) or inside archives (zip files, for instance), without realising that is what it is doing. See the tclvfs extension on http://sourceforge.net/projects/tclvfs/ for more info (this extension should compile easily on win/unix/macos, most of the code is in fact in Tcl so you can easily extend it, add new vfs types, fix existing ones, etc; the C part simply exposes the vfs support in the core to Tcl). Also see the testfilesystem command in Tcl's testsuite, and of course [tclkit]. Also take a look at the [One-line web browser in Tcl]. Using the tclvfs extension, you can now do things like this (after a ''package require vfs''): vfs::urltype::Mount ftp file copy ftp://foo.bar.com/pub/Readme . or vfs::zip::Mount foo.zip foo.zip cd foo.zip ; glob * or vfs::urltype::Mount ftp set listing [glob -dir ftp://ftp.scriptics.com/pub *] or vfs::urltype::Mount http set fd [open http://sourceforge.net/projects/tcl] set contents [read $fd] ; close $fd or nested mounts: vfs::ftp::Mount ftp://ftp.ucsd.edu/pub pub vfs::zip::Mount pub/archive.zip pub/archive.zip % load a .dll from inside a .zip which sits on a remote ftp site. load pub/archive.zip/foo.dll (Caveat: I haven't actually tried this last one....) ---- Notice that you need to ''Mount'' non-native filesystems before you can use them. There are two kinds of mounts that tclvfs supports. The first kind is a particular mount point such as an archive 'foo.zip' or 'ftp://ftp.scriptics/com/pub' which can be mapped onto any point in the local filesystem. The contents of those mounts (i.e. the contents of the zip archive or the contents of the remote ftp site) are then accessible as normal, local files. The second kind of mount is a 'protocol' (somewhat clumsily called a 'urltype' in the current vfs library), which is illustrated in 3 of the 5 examples above. Here we are effectively creating a new ''drive'' called 'ftp://' or 'http://', and any access within that ''drive'' causes the tclvfs library to attempt to perform a mount of the first kind so that the contents can be accessed. Please help develop the tclvfs package further! ---- '''Future Vfs Thoughts (i.e. not implemented in Tcl 8.4)!''' Asynchronous filesystem access would be useful, primarily for copying files, but also potentially other purposes: file copy -command progress http://a.b.c/foo . set fd [open http://a.b.c/foo w] puts $fd -command progress $megabytes load -command progress http://a.b.c/tk84.dll Note that both 'file rename', and 'load' may require cross-filesystem copies. ---- '''TclVfs building, compilation and bugs''' Has anyone had luck compiling this on a Solaris machine? I haven't had such luck (using the latest cvs source). Sure would like to use this. Marty Backe What kind of problems did you have? Compile errors, or the configure/make stuff didn't work? If the former, then please report a bug on tclvfs, if the latter, then that's just the 'TEA' mess, and you're probably best asking on comp.lang.tcl ---- I have built tclvfs on sparc/solaris - but it is too buggy to run. I've reported my bug to the sf.net bug list. [LV] Note: tclvfs is known to build and run ok on: * windows * linux (please add your platform when it works). There are preview stand-alone builds of [TclKit] for Windows and Linux, which use the new VFS core and include support for the above example (see [http://www.equi4.com/previews/]). I have not yet packaged the adjusted sources, which are essentially off-the-shelf Tcl, Tk, MetaKit, and TclVfs releases... -- [JCW] ---- [Category Package]