Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!gatech!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.micro.apple Subject: Re: Apple ProDos help needed Message-ID: <3249@brl-tgr.ARPA> Date: Fri, 15-Nov-85 05:57:23 EST Article-I.D.: brl-tgr.3249 Posted: Fri Nov 15 05:57:23 1985 Date-Received: Sat, 16-Nov-85 03:46:24 EST References: <109@tetra.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 25 > I use UNIX (4.2 BSD) daily in my work, and am familiarizing myself with > MS-DOS. Therefore, when I started to examine ProDos, I expected a similar > way of changing directories. But the book I am using, by a guy named > Campbell, does not seem to explain how you get from one directory to another. > Paths, yes, but I see no "change directory" command, such as cd in UNIX. ProDos does not maintain a concept of "current working directory", but instead maintains a "current prefix" which is prepended to filenames. This accomplishes much the same thing. The Basic Language Interpreter supports a "PREFIX" command, which reports the current prefix if no arguments are used (UNIX "pwd"), or sets the prefix to the user-specified argument when present. There are of course Machine Language Interpreter system calls for this. Unfortunately, there appears to be no built-in equivalent of the UNIX "cd .." and definitely no concept of a $HOME directory (UNIX "cd" with no arguments). Fortunately, if the new prefix being set does not start with /, the existing prefix is prepended to it, so there is equivalent behavior to the UNIX "cd subdir" (relative path). If one were to implement his own shell, it would be easy to implement "cd .." by getting the current prefix, then trimming off the last piece of it and setting the new prefix to that. This is similar to what I did in the BRL SVR2 Bourne shell to circumvent symbolic links to directories. I rather like the prefix approach, except for its lack of ".." support.