PathMan Version 1.0 Copyright 1988 by William S. Hawes All Rights Reserved. PathMan is a trick AmigaDOS handler that allows you to combine multiple directories (even on different volumes) into one "path" directory. Once you've defined such a path directory, all references to the path from other software applications are processed by PathMan, and the handler makes it appear that the combined directories are really just one big directory. The internal logic of the path handler performs a linear search of the directories and thus transparently provides a search-path facility for any software application. PathMan has a number of possible applications. Since the directory concatenation is done at the DOS level, any software that makes use of normal DOS calls will work with the path handler. In particular, system directories like C: or LIBS: can be spread over several directories or volumes to simplify maintenance or back-up procedures. PathMan is provided as an free bonus for WShell (and ARexx) customers but is not otherwise distributable. Note that the present version is still experimental in its design and may not work with all existing software, although it should work well in most applications. Your suggestions for improvements are welcome and will be considered carefully. -- Defining a Path -- PathMan defines a path as a list of directories (or files) separated by the delimiters comma (,), semicolon (;), vertical bar (|), or white space. The directory names must include a device specification, as there is no "current directory" for the handler itself. A path can include nested references to other paths up to 10 levels deep. The following are all valid path specifications: path:df1:c,df0:devs/printers,jd0: path:vols:,vols:c Path directories can be created automatically using the ASSIGN command by simply referring to a name relative to PATH:. By default the path is transient and disappears as soon as the ASSIGNed name is removed, although permanent path directories can be created if required. Note that a path name including white space must be enclosed in double-quotes in order for AmigaDOS to accept it as a single argument. Paths may refer to any other devices, directories, or volumes, including other path directories. Devices need not be mounted or created at the time a path is defined, but will be requested when actually needed for a search. Directories included in a path can be redefined at any time, and the path will use the definition in effect when the search takes place. When a path is referenced by a call to DOS, any nested definitions are fully expanded into their component directories. The directory name following a device name is distributed to all of the components. Before adding a new directory to the expanded list, the handler checks whether the exact specification already occurs earlier in the list to avoid duplicating the search. A path can be either transient or permanent. Transient paths come into existence by requesting a lock on an object relative to the PATH: device, most conveniently using the ASSIGN command. The transient path persists until all locks on it are released. Permanent paths can be created using the DOS ACTION_CREATE_DIR packet. Note that the MAKEDIR command doesn't work directly, since it first tries to lock the directory and concludes that it already exists. Once created, a permanent path can be removed using the DELETE command, provided that there are no outstanding locks on it. -- Protection Attributes -- Path directories can be assigned protection attributes using the PROTECT command. These attributes are used when searching a path; if the action to be performed requires a specific permission, the search skips over any candidate directories lacking the necessary attributes. For example, suppose that the following paths are created: 1> ASSIGN P1: path:df1:,df0: 1> PROTECT P1: r 1> ASSIGN P2: path:p1:c,ram: Then a search of P2: requiring only read permission -- like a LIST -- will search the P1: directories, but a search requiring delete permission will go directly to the RAM: directory. -- Installing and Using PathMan -- To install PathMan, just copy the PathHandler file to your L: directory, append the mountlist entry to your DEVS:mountlist file, and mount path:. You're now ready to start building paths using the ASSIGN command. For example, the following commands would define C: on three volumes: 1> mount path: 1> assign C: ram:c,df1:c,df0:c 1> list C: ; show what we got ... The script file "Install-PathMan" will copy the files for you and append the mountlist entry to DEVS:MountList, after renaming the existing file to DEVS:MountList.old. The script "setup" shows some usage examples. You may also want to use "pathwack", a debugging aid that shows how the path search is being conducted. To run pathwack, open a separate shell and issue the command "pathwack". The expanded paths being searched by PATH: will then be shown in the shell window. Use a Control-C to exit. -- Limitations -- The present version of PathMan doesn't work with the VDK: "survivable" ram disk. -- Problems or Questions? -- PathMan is still somewhat experimental in its design, though it should operate reliably. Please report any bugs, quirks, or misfeatures promptly so that they can be corrected, and don't hesitate to offer suggestions! Bill Hawes (508) 568-8695 November 23, 1988