[up] [next]

Introduction

FileBrowsers allow inspection and manipulation of files and directories. In addition to inspecting directories, you can also use them as an editor for text files. Finally, they can be used to load (and compile) Smalltalk source code into the system.

A fileBrowser can be either started by the Launcher
or by evaluating the Smalltalk expression

    FileBrowser open
in a Workspace or from within your program.

The above starts the fileBrowser in the current directory. To start a browser on some other directory, evaluate:

    FileBrowser openOn:'someDirectory'

Typically, after startup, a fileBrowser looks like:

[fig: filebrowser hardcopy]

It consists of 4 subviews; these are:

  1. path field
    shows the name of the current directory

  2. file pattern field
    allows a match pattern to be entered

  3. file list
    shows file- and directory names

  4. contents view
    shows a files contents

  5. OS command view (not shown in above figure)
    allows input of OS (UNIX-) commands

To see the contents of a file, simply double-click on the corresponding name entry in the file list. If the selected item is a text file, its contents is shown in the lower (contents-) view.
If its a bitmap image file (TIFF, JPG etc.), an image inspector is opened on its contents.
If the item name represents a directory, a change-directory into this directory is performed.

When changing directories, the fileBrowser will automatically look for a file named ".dir.info" or "README" and show its contents if present. (so, its a good idea to create such a file in every directory, to lead your friends through the directory jungle.)

The file list will only show files matching the pattern in the pattern field, which is by default "*", thus matching all files. Directories are always shown, unaffected by the match pattern. To change the match pattern, move the mouse pointer into the pattern field, edit the pattern and type return (or accept in the pattern fields own popupMenu).

All of the above mentioned subviews provide a popup menu, which is activated by the middle mouse button (or the right button, if you use a 2-button mouse).

By the way:
pressing an alphabetic key in the fileList will make it scroll to the next entry whose name starts with that character. If you press "SHIFT" at the same time, it will find the previous entry starting with that character.
Typing "RETURN" performs the double click function on the selected entry.
Also notice that "CURSOR_UP", "CURSOR_DOWN" "HOME" and "END" keys too can be used to change the selection, while "PAGE_UP" and "PAGE_DOWN" scroll the list.
This is true for all views which show a list to select entries from.

Doc $Revision: 1.15 $ $Date: 2016/09/14 09:41:12 $