ActiveTcl - Virtual Filesystem Explorer

Virtual Filesystem Explorer

The Virtual Filesystem Explorer (VFSE) is a graphical application used to locate and examine the contents of filesystems, starkits/starpacks, and .zip files. Once files and directories have been added to the virtual directory tree via "mounting", their contents can be viewed in the VFSE.

The VFSE is particularly useful for viewing the contents of files that are not visible in Windows Explorer, such as starkits and starpacks. Mounted files can be copied or moved to a new location, where you can open them with a text editor or another application.

Note: Because the files mounted in the VFSE are virtual, the file structures created via mounting can only be viewed in the VFSE, and are not actually added to a corresponding local or network drive. Mounted files remain visible for the duration of a VFSE session. That is, if you close the VFSE and re-open it, any previously mounted files will no longer be mounted. If you want to preserve mounted files and directories, you must copy or move them to a real location. You can also unmount directories within a given session of the VFSE.

By default, the VFSE displays a list of available drives in the Folders pane. Click the plus sign next to a drive to display the hierarchical structure of directories and files contained within. Click a folder in the Folders pane to view its contents in the display pane on the right.

To run the VFSE on Windows systems, enter tclvfse.exe at the command prompt, or select Start|Programs|ActiveTcl 8.5|ActiveTcl Virtual Filesystem Explorer.

To run the VFSE on Unix systems, enter tclvfse at the shell prompt.

Note: To change the font size displayed in the Virtual Filesystem Explorer, press Ctrl-plus to increase the font size or Ctrl-minus to decrease the displayed font size. If using Windows with a mouse wheel, you can alternatively press the Ctrl key and then rotate the mouse wheel to increase or decrease the font size displayed in the Virtual Filesystem Explorer.

Mounting and Unmounting Starkits, Starpacks, .Zip Files, and Filesystems

Before you can view the contents of starkits, starpacks, and .zip files using the VFSE, the files must be mounted. There are two ways to mount a file or directory with the VFSE. You can either mount the file at a selected position in the directory tree, or you can append it as a separate root directory at the bottom of the directory tree.

To mount a starkit, starpack or .zip file in a selected position:

  1. In The Folders pane, navigate to the file that you want to mount.
  2. Select the file.
  3. Select Tools|Mount Selection. A new virtual subdirectory will be created in the Folders pane beneath the selected directory.

To mount a starkit, starpack or .zip file as a root directory:

  1. Select Tools|Mount Archive. A dialog box will be displayed prompting you to select a file.
  2. Select a file, and click Open. A new "drive" icon displaying the path for the mounted file will be added to the Folders pane.

To mount a file from the command line, enter:

tclvfse.exe <file location>

The VFSE will launch with a "disk" icon in the Folders pane that displays the path for the mounted file.

To mount all filesystems:

This is only necessary if you have mounted a file from the command line, and then decide you would like to mount all of the available drives and directories. To do so, select Tools|Mount Volumes.

To unmount a directory:

  1. In the Folders pane, select the directory that you want to unmount.
  2. Select Tools|Unmount Selection. The directory will be removed from the Folders pane.

Managing and Viewing Files

Use the commands on the View menu and the VFSE toolbar to manage and view mounted files. Choose from the following View menu options:

  • Large Icons: View files as large icons.
  • Small Icons: View files as small icons.
  • List: View a list of files arranged in the order specified by the View|Arrange Icons menu command.
  • Details: View a list of files with additional fields containing data about the size and type of the file, and when the file was last changed.
  • Arrange Icons: Select the sort criteria for files in the display pane. Arrange them by name, type, size or date.
  • Go To: Navigate to a different location in the VFSE. Move "Back", "Forward", or "Up One Level". These commands can also be invoked from the toolbar.
  • Refresh: Update the VFSE with any new data. This command can also be invoked from the toolbar.

Click the File Properties button (rightmost on the toolbar) or select File|Properties to view information about the selected file or directory, including how the selected item is defined by both Tcl and your operating system.

Click the close ("X") button in the top right corner of the Folders pane to hide the Folders pane. Click the Folders button on the toolbar to display the Folders pane.

Copying and Moving Mounted Files

An advantage of mounting files is the ability to copy or move mounted files to a real location on a local or network drive, where they can be opened and viewed with another application.

To copy a mounted file:

  1. In the VFSE, select the file or directory that you want to copy
  2. Select Edit|Copy.
  3. In the Folders pane, navigate to the directory where you want to paste a copy of the selected file or directory.
  4. Select Edit|Paste. The copy of the file or directory will appear in the new location in the VFSE, and will be created in the corresponding location on the local or network drive.

To move a mounted file:

  1. In the VFSE, select the file or directory that you want to copy.
  2. Select Edit|Copy to Folder. The Browse for Folder dialog box will be displayed.
  3. Select the destination directory, and click OK. The file or directory will appear in the new location in the VFSE, and an actual version of the file will be created in the corresponding location on the local or network drive.

Command Line Use

The explorer can be invoked from the command line with the path to a mountable archive. The explorer will mount the archive during startup and show its contents immediately, instead of displaying the regular filesystem.

After the path argument, one of the following commands can be specified to invoke other operations on the archive:

tclvfse ARCHIVE put PATH PATH-IN-ARCHIVE

Copies a file from the native filesystem into the archive. This can be used to replace an existing file. Metakit archives only (starkits, starpacks, etc.); cannot be used on zip files.

tclvfse ARCHIVE get PATH-IN-ARCHIVE PATH

Copies the file in the archive to the native filesystem. Metakit archives only; cannot be used on zip files.

tclvfse ARCHIVE ls

Lists the contents of the archive. Useful for determining internal archive paths before using the put, get or rm commands.

tclvfse ARCHIVE open

Opens the archive for display. Equivalent to specifying no command after ARCHIVE.

tclvfse ARCHIVE rm PATH-IN-ARCHIVE

Deletes the specified file from the archive. Metakit archives only; cannot be used on zip files.

tclvfse ARCHIVE vacuum

Removes all wasted space from the archive. Metakit archives only; cannot be used on zip files.

Free Space in Metakit Files

The rm and put methods modify the metakit database and can cause the creation of unused free space. The vacuum method can be used to force the removal of this unused space, shrinking the database to the minimum required to hold its data.