XEROX DIRGRAPHER 2 4 1 DIRGRAPHER 1 4 By: Shaul Markovitch (shm%eecs.umich-cilprnet.csnet@csnet-relay.ARPA) INTRODUCTION The DirGrapher package was created to enable the INTERLISP-D user to refer to the file system as if it was a tree structured system. Using the grapher package for display, the user can create directories, delete directories, back up and directories , move files between directories, etc . INTERLISP-D currently supports a pseudo-directory structure using name conventions. However, the user is limited in the use he can make of these conventions.The only command that helps him is the "conn" command for changing the current directory, and even this command is not so useful when you have to type something like: "CONN {DSK}USERS>JOHN>PROJ1>LISTINGS>". The DirGrapher package displays a tree structure of the directories, and allows the user to perform operations on directories by selecting nodes from the tree. For example connecting to a directory is executed by selecting "Conn Dir" from the menu and then selecting the appropriate node from the tree. DirGrapher works together with the FileBrowser package. While DirGrapher allows operations on directories, FileBrowser is used to work within a directory. The behavior of FileBrowser is slightly different when working with DirGrapher; it will list on its window only those files from the requested directory that are not included in any of its subdirectories. USING THE DIRGRAPHER PACKAGE You can create a directory grapher window either by selecting "DirGrapher" from the background menu, or by calling the function : (DIRGRAPHER {DEV} WINDOW-REGION PATH?) [Function] The call will initiate a DirGrapher process on {DEV} directory. If {DEV} is NIL, the default is the value of DG.DEFAULT-DIR (initially {DSK}) . If WINDOW-REGION is given, the directory tree will be displayed on a window with that region, otherwise it will get the region from the user interactively. If {DEV} is a list, DIRGRAPHER will interpret it as a tree and will use it as the directory tree. This is useful if you use a file server with very large numbere of files. Applying DRGRAPHER in the regular way can take very long time, since it computes the tree using the list of all files . Instead you can keep variables with tree structures that you build yourself and call DIRGRAPHER on these variables. Another adventage of using this option is that the tree structure does not have to be complete, and you can specify only the parts that you need. The argument PATH? has meaning only when using this option. If the root of the tree is not the server name, you have to specify the path to the root as a list with the server name as the first element and the root of the tree as the last element. Example: (DIRGRAPHER '(INTERMEZZO (LIBRARY) (SOURCES)) NIL '({ERIS} INTERMEZZO))) . You can also manipulate the tree using the "Create Dir" command and access the tree through the window property DG.TREE. The DirGrapher window has a menu with the following items: Create Subdir Create subdirectory. Will ask for a selection of the parent directory and will prompt for a name for the new directory. Delete Dir Delete directory. Will ask for a selection of the directory that is to be deleted, and will delete the directory and all its subdirectories, together with the files that belong to them. If there are any files in these directories, the user will be asked for confirmation. Connect Dir Connect directory. Will change the current working directory. The current directory is marked by a box around it in the graph. If DG.BOX-ALL is set to T (the default), changing the current directory will be displayed on all the active DirGrapher windows, otherwise it will be marked only on the current window (which is faster). Move Dir Move directory. Will move a whole directory structure, including all subdirectories and the files in them, to a new parent directory. This operation will accept selection of directories from any active DirGrapher window. Thus, you can perform operations like moving a directory from hard disk to floppy or from one file server to another . Copy Dir Copy directory. Same as above but will copy instead of move. Backup Dir Backup directory. There are two parameters in the backup process. One is the directory on which the back up files will reside . If the "Backup Dir" item was selected or the "on selected" subitem was selected, the program will ask the user to select a directory and the backup files will reside in this directory. If "On default" was selected, the backup will reside in the directory which is the value of the variable DG.DEFAULT-BACKUP-DIRECTORY. Initialy, this variable is set to {FLOPPY}, and stand alone users will usually use this default. The second parameter is the directory which has to be backed up, and in both cases the program will ask the user to select this one. The selected directory will be copied in its current state to the backup directory. The current state of backed up (the list of files currently on the selected directory) is stored as well . There are two possible backup modes and a menu will pop up to enable the user to select between the two. The first mode is for backing up the directory and all its subdirectory structure. The other mode is for backing up only the directory itself. When backing up is used while DG.COPY-OVER is NIL (The default), only files that are not already on the floppy(i.e. files that were created after the last backup operation) will be backed up. This is the preferred way of working - you have the the whole history of your project on the backup facility - either a floppy or a file server, but if you should face a fatal failur of your current file server or the local disk, the restore operation will restore the last state of the directory structure. If the backup devise is the floppy and more then one floppy is needed , the user will be asked to insert more floppies Restore Dir Restore directory is the compliment of the above back up operation. It restores a directory from the backup device. The selection process is the same as in the backup operation. The only problem is that when the user is asked to select the directory that should be restored , but usually this directory does not exist yet, thus the directory has to be first created (using "Create Dir" command) so that it will be available for selection . Move File(s) Move files from one selected directory to another one. Will display a menu with the file names in the source directory, and will let you select as many files as you want. Selecting "Stop" will initiate the moving procedure. Copy File(s) Same as above but will copy the files instead of moving them. Apply FB Apply File Browser. Will apply FileBrowser to the selected directory. There are two possible modes of applying FileBrowser on a directory. If you select the item "Apply FB", or the subitem "On directory only" the files that will be listed on the FileBrowser window are those files that are in the selected directory but not in its subdirectories. If the subitem "On directory and subdirectories" was selected, filebrowser will be called in the regular way and the files that will be listed are all the files in the directory and the subdirectories. Apply DG Apply DirGrapher. Will apply DirGrapher to the selected directory. Update Update the directory tree. Will compute the tree structure again. The computation is based on list of files that are currently exist and match the specified prefix. Thus, if there is a directory on the tree which has no subdirectories and does not "contain" any file, the directory will not appear on the tree after the update operation. INTERRUPT The INTERRUPT menu at the bottom of the window allows you to interrupt the DirGrapher process easily. GLOBAL VARIABLE SETTABLE BY THE USER There are several global variables which control the behavior of DirGrapher functions. The user can set those variables AFTER loading the DirGrapher package: DG.COPY-OVER [Variable] This variable will affect the behavior of all the operations involving copying files. If NIL (the default) then whenever a file has to be copied to a directory, and a file with the same name, extension and VERSION already exists on this directory, the copy operation will not be executed. Note that this test does not guarentee that the two files are the same . If non NIL, then the existing file on the target directory will be deleted, and then the source file will be copied. DG.BOX-ALL [Variable] If this variable is set to T (the default) then whenever "Conn Dir" is selected from any active DirGrapher window, the new "connected" directory will be boxed in all the active DirGrapher windows. Otherwise it will be boxed only in the window where the command was selected. DG.DEFAULT-DIR [Variable] The value of this variable will determine the default directory when DIRGRAPHER is called with a null first argument, or when it is called from the background menu. DG.DEFAULT-BACKUP-DIRECTORY [Variable] This variable will determine where the backup files will be stored when "Backup Dir On defualt" is selected, and will determine where the restore function will look for the backup files when "Restore From default" is selected. The default value of this variable is {FLOPPY}. DG.VERTICAL-HORIZONTAL-OPTION [Variable] Can have the values of either 'VERTICAL (the default), or 'HORIZONTAL. Will determine the way in which the graph will be laid out. DG.MENU-EDGE Can have one of the values TOP, BOTTOM, LEFT or RIGHT(the default). Determines which edge of the window the DirGrapher menu will appear on. DG.MIN-WIDTH, DG.MIN-HEIGHT, DG.MAX-WIDTH, DG.MAX-HEIGHT [Variables] Will determine the minimum and maximum dfwidth and height for the DirGrapher window. DG.ICONFONT, DG.GRAPH-LABEL-FONT, DG.PROMPTWINDOWFONT, DG.MENU-FONT Changing the fonts won't cause any problem except the icon font. The others automatically adjust the sizes of the menu graph and promptwindow when created. Changing the font of the icon is not recommended since its size is fixed. REMARKS 1. The DirGrapher package makes extensive use of the INTERLISP-D DIRECTORY function. Thus sometimes its response will be slow. Roughly speaking, the time it takes to compute the tree is (K * number-of-files-on-the-directory) seconds, where K is between 0.25 and 0.5 . Thus it will take a reasonable time to compute a directory tree of a directory that contains a few hundreds files, but it take VERY long time to compute a tree of some directory in a file server which contains thousands of files. Usually the computation takes place only once since from then on the user does not close the dirgrapher window but shrink it. Specifying the tree itself when calling DIRGRAPHER can help overcoming this problem. 2. The only commands that allow you to select directories from other DirGrapher windows are Move and copy files, move and copy directories, backup and restore. 3. You can shrink the DirGrapher windows to an icon which will be the same size as the FileBrowser icon. Thus it will be easy to keep your screen tidy. (Using TinyTidy for example). 4. You cannot run two DirGrapher commands on the same window concurrently. because such concurrent operations have unpredictable results. If you want to change this, set DG.CONCURRENT to T. 5. You can run two concurrent DirGrapher processes on two different windows. This behavior is sometimes dangerous. If you want the system to allow only one DirGrapher process to run at a time then set DG.CONCURRENT-ALL to NIL. 6. When the main window of DirGrapher is inverted, it means that the DirGrapher is running and you should wait. 7. Copy selection of a node will copy the full name of the subdirectory into the current TTY window. Copy selection in the DirGrapher window but not in a node region will have the regular Grapher behavior (the graph itself will be copied). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC ) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC )) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC )) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD(È (È (È ($È((MODERN MODERNLOGOMODERN MODERN MODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN G "G31iˆ‰D9[} <x  I X = *†Âðy À à > - CV g %ž á"¦-/„ ŒHUDç ܤ·¾åqø  /­­zº