Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!decwrl!deccrl!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!solan1.solan.unit.no!dhmyrdal From: dhmyrdal@solan.unit.no (Dag H}kon Myrdal) Newsgroups: comp.sys.acorn Subject: Re: Pseudo Filing Systems via *set Keywords: Filing systems Message-ID: <1991May1.184943.1835@ugle.unit.no> Date: 1 May 91 18:49:43 GMT References: <3089@krafla.rhi.hi.is> Sender: news@ugle.unit.no Reply-To: dhmyrdal@solan.unit.no (Dag H}kon Myrdal) Organization: Norwegian Institue of Technology Lines: 55 In article <3089@krafla.rhi.hi.is>, thsa@rhi.hi.is (Thorvaldur S Arnarson) writes: |> |> The answer is quite simple. A path can consist of a list of directories |> like: |> *set foo$path adfs::4.$.,scsi::5.$. |> so what would you want the OS to do about a command like: |> *cat foo: |> or even worse: |> *rename foo:text foo:bar |> *save foo:bar 8000+100 [...] Simple! I want it to do what I tell it to as long as it's not ambigous... After all, most commands can use '*' and '#' as wildcards, so why shouldn't pseudo filing systems work the same way? After looking at your examples, I can see two possible solutions: 1: Do the same thing as is done for wildcards: search the path as given, using the *FIRST* occurence found that satisfy the command. If the command is sensible using several arguments, then DO SO! i.e.: *cat foo: equals *cat adfs::4.$ and then *cat scsi::5.$ *rename foo:text foo:bar uses adfs::4.$. if found, scsi::5.$. otherwise... *save foo:bar 8000+100 uses adfs::4.$. 2: The not so sophisticated, but easier to implement solution would be: When more than one path-reference is given via a pseudo-filing-system: Either: stripp off all susequent references, or, if the command could be disastrous if not handled the way the user expected: give an error stating: "ambigous reference found in foo:" i.e.: *rename foo:text foo:bar uses adfs::4.$.text if found, scsi::5.$.text otherwise... *save foo:bar 8000+100 could flag an error As you can see; the whole point is that there is *no* need to eliminate the useful aspects of pseudo filing systems just because it *might* cause the user to issue ambigous commands... Just define a way to handle such cases. Either give an error or do the same thing as one would expect from a 'wildcarded' command! -- Dag Haakon Myrdal, student of electronics -- email: dhmyrdal@solan.unit.no (-SUN internet, Trondheim) snail: DH Myrdal, Moholt Alle 2-01, N-7035 Trondheim, Norway phone: +47 7 588244 -- About MS-DOS: "... an OS originally designed for a microprocessor that modern kitchen appliances would sneer at...." - Dave Trowbridge, _Computer Technology Review_, Aug 90