| [ Team LiB ] |
|
Additional Filesystem Features and CommandsVirtual FilesystemsTcl is now "virtual filesystem (VFS) aware," which allows filesystem interaction and input/output to take place on something other than the system's native filesystem. (TIP #17) This means that, given appropriate extensions, any ordinary Tcl code can use the standard file commands: cd, pwd, glob, file, open, etc. and operate on "virtual files" without realizing it. Such virtual files can be remote files (on FTP sites or over an HTTP connection) or inside archives (for example, Zip or tar files). The basic Tcl distribution doesn't expose the capability of manipulating virtual filesystems at the Tcl script level. However, the new C APIs enables several interesting extensions and applications. TclVFS is the extension that allows standard Tcl scripts to "mount" and use virtual filesystems. TclVFS includes support for virtual filesystem types including: FTP, HTTP, WebDAV, Zip archives, tar archives, MetaKit databases, and Tcl namespaces. TclKit, which provides a method of distributing single-file, standalone executables written in Tcl/Tk, is also based on Tcl's VFS capabilities. TclKit is described in Chapter 22. New file Subcommands and glob OptionsThe file command gained several new subcommands, primarily to support the new virtual filesystem capabilities described above (TIP #17): file normalize, file separator, and file system. TIP #17 added the glob -tail option. TIP #99 added the file link command for creating hard and symbolic links. See "The file Command" on page 108 for more information on the file subcommands, and "Matching File Names with glob" on page 122 for more information on glob. |
| [ Team LiB ] |
|