Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!att-ih!ihnp4!inuxc!iuvax!bsu-cs!jdh From: jdh@bsu-cs.UUCP (John Hiday) Newsgroups: comp.sys.amiga Subject: Re: The 1001 Paths Message-ID: <2472@bsu-cs.UUCP> Date: 26 Mar 88 02:55:11 GMT References: <4587@garfield.UUCP> <5489@well.UUCP> <850@nuchat.UUCP> <582@imagine.PAWL.RPI.EDU> Reply-To: jdh@bsu-cs.UUCP (John Hiday) Organization: Ball State University UCS, Muncie, IN Lines: 43 In article <582@imagine.PAWL.RPI.EDU> beowulf!lunge!jesup@steinmetz.UUCP writes: >In article <850@nuchat.UUCP> peter@nuchat.UUCP (Peter da Silva) writes: >> >> [description of how a PATH: device would function deleted...] > >What happens when someone opens c:filename for write if a) it exists in one >of the directories, b) exists in more than one, c) exists in none? > >What does one get back when one Examine()s the result of Lock("c:",...)? >Or when one ExNext()s it? > >Sorry, I'm afraid this will remain a fantasy. Why not just use shell >variables? List won't find them, but then again list wouldn't produce the >output you showed anyway. List, dir, whatever would work as advertised. Such a beast exists on... (dare I say it?) VMS. Here is a description of how VMS handles the situations you bring up: 1) Open a file for write a) File exists in one directory - the one file is opened for write. b) Exists in more than one dir - the first file it finds is opened for for write. c) Exists in none - If create on non-exist is set, a new file is created in the first directory in the path, if create isn't specified then it returns an error just like it would if you weren't using a path. 2) Result of Examine() - finds the first file in the first directory. 3) Result of ExNext() - finds the next file in the current directory, or if you just got the last file in the current dir it finds the first file in the next dir. When you get to the last file in the last dir it returns a no-more-files error just like it would if you weren't using paths. Basically it just makes the path look like one big directory, except that the files are grouped by directory inside the big one. -- == John Hiday UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!jdh == Ball State University / University Computing Services GEnie: JDHIDAY == Muncie, IN 47306