radford@calgary.UUCP (Radford Neal) (03/08/88)
I've been thinking of writing a file browser for NeWS, and would be interested in hearing if such a device already exists, or if anyone has ideas on how it should be done. By a "file browser" I mean something that lets you wander around directories and look at the contents of files. Essentially a window-based replacement for 'ls' and 'more'. (You might add editing, file deletion and rename, bells, whistles, and more of course...) Radford Neal
radford@calgary.UUCP (Radford Neal) (03/17/88)
Thanks to those who responded to my query about file browsers. I didn't reply to most of you because of our decaying mail system. Sam Leffler (ihnp4!ucbvax!okeeffe.berkeley.edu!sam) reports that he has written such a beast (for NeWS), and plans to make it publicly available once it's polished a bit more: Each directory is presented in individual "frames" (using a library of mine). You can traverse the file system with only the mouse by selecting file names (".." appears so you can walk up the tree). Selecting a directory gives you a new frame with an elaborated ls (directories in italics, regular files in roman, etc.) Selecting a file name gives you a frame with its contents. With regular files the browser uses a builtin version of the "file" command to discern the contents of the file and then formats the text accordingly (e.g. C programs are pretty printed with comments in italics and keywords in bold). Mike Meyer (ihnp4!ucbvax!violet.berkeley.edu!mwm) did a similar sort of think for the Amiga: The program is basically a straight lift of the Smalltalk class browser, using menus instead of browser panes. Everything lives in the menu bar on the Amiga. The first menu is for "Disks," and lists all mounted volumes... Selecting an entry from this menu causes it to become the name of the next menu, and all the files on that device (in that directory) are entries into that menu. Directory entries have a "/" appended to the name, all other entries are copies as-is from the directory. Selecting a directory entry from any menu causes any menus below the one selected from (below in the sense of the directory hierarchy, that is) to be discarded, and the selected directory to be added as the new lowest-level menu. Selecting a regular file also causes lower-level menus to be discarded. The file is then displayed in some way. In the original version, it was dropped into a simple file perusal program - scroll bars, page forward/backward gadgets, etc... Several people suggested looking at the Mac Finder. I'm familiar with it. Its biggest problem as a browser is the long time required to start up an application to look at a file's contents. I haven't tried the new MultiFinder, but I don't think it solves that problem. I'm also not sure the interface is good for a program development environment. My current conception is a tiled system looking something like this: <PATH OF ROOT DIRECTORY OF THIS FILE BROWSER> <file name> | s <FILE NAME X> | c <dir name> | <contents of file X> r <file name> | o <DIR NAME Y> | l <file name> | l <file name> |-------------------------------- | <file name> | s | <FILE NAME Z> | c | <file name> | <contents of r | | file Z> o | | l buttons | buttons | l The file brower "lives" in some directory, identified at the top. The files and directories in that directory are listed on the left. Some of these have been "selected" (shown here in upper case, maybe really highlighted some other way). The selected files/directories occupy the space to the right of the file listing (here there are two selected items - a file on top, a directory below). A file has its text displayed, with a scroll bar. A directory is displayed as another list of files/directories, which may in turn be selected. The result is a tree-structured display of the selected parts of the hierarchy. Buttons at the bottom may control options like whether to display .o files, etc. There also have to be ways of adjusting window sizes, getting rid of panes, etc. There would be some way to create an entirely new file brower rooted at one of the files/directories seen, and maybe an option to replace the current browser with one living lower down or higher up. You can, of course, imaging extending the whole scheme into a complete shell, allowing execution of files as programs, etc. We'll see if I ever get the time to write this... One person suggested using Gnu Emacs, which would be easy in its way, but probably limits the user interface possibilities. Radford Neal