home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / oberon / text / dir.text (.txt) < prev    next >
Oberon Text  |  1977-12-31  |  3KB  |  28 lines

  1. Syntax14b.Scn.Fnt
  2. ParcElems
  3. Alloc
  4. Syntax10.Scn.Fnt
  5. Syntax10b.Scn.Fnt
  6. (HM Sept. 95)
  7. Dir is a tool that allows the user to easily manipulate directories and files. It is similar to the Macintosh Finder or the Windows FileManager. The contents of a directory is shown in a viewer using one line for each entry (file or directory). A special icon (text element) at the beginning of a line indicates wether the entry is a file or a directory. The directory viewers are always kept up to date, i.e., if an entry is inserted, deleted or renamed by an Oberon program, this change is immediately reflected in the directory viewer(s).
  8. Opening a directory viewer
  9. The viewer of the current directory can be opened with Dir.Open. Any subdirectory in it can be opened with a middle-right click at the subdirectory icon. Directory viewers can be closed with System.Close.
  10. Renaming entries
  11. Simply edit the names in the directory viewer. As soon as the caret is removed from a modified line the corresponding entry is renamed. If the name is illegal the line is restored to its previous contents and the entry is not renamed.
  12. Deleting entries
  13. Select the icons of the entries to be deleted with the middle mouse button and invoke Dir.Delete from the Dir menu of the directory viewer. Note that directories can only be deleted if they are empty.
  14. Moving and copying entries between directories
  15. Open the viewers of the source and the destination directory. To move entries, select the entries in the source viewer with the middle mouse button and drag them to the destination viewer keeping the middle mouse button pressed. To copy entries, interclick the left mouse button while dragging the entries to the destination viewer.
  16. Creating a new directory
  17. A new directory can be created with the command Dir.New which takes a path name as an argument. The path name can be specified either as a full path (e.g., HD:Oberon:User:NewDir), as a partial path starting from the current directory (e.g., :NewDir), or as a partial path starting from the directory that contains the Oberon application (e.g., $User:NewDir). If a directory with this path already exists, nothing is created.
  18. Selecting and deselecting entries
  19. Entries can be selected individually by clicking the middle mouse button on their icons. Alternatively one can select all entries matching a certain pattern (e.g., *.Bak) with the command Dir.Select that takes the pattern as an argument. The pattern must be terminated by a " ", a TAB or an EOL. Entries can be deselected using the command Dir.Deselect.
  20. Opening files
  21. A middle-right click at a file icon will open the file using the command that was specified in Dir.Menu.Text (see below).
  22. Customizing (Dir.Menu.Text)
  23. The file Dir.Menu.Text contains a custom menu as its first line (usually a list of popup menus). Subsequent lines specify the commands that should be used for opening files. These lines have the following syntax:
  24.     Openers = {Pattern Command}.
  25.     Pattern = string.                    -- e.g. "*.Tool"
  26.     Command = name | string.      -- e.g. System.Open
  27. Files for which there is no pattern are opened with Edit.Open.
  28.