home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.msdos.programmer:3068 comp.os.msdos.programmer:11754
- Path: sparky!uunet!van-bc!vsystem!rick
- From: rick@vsystem.wimsey.bc.ca (Rick Vandenberg)
- Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
- Subject: Re: Is findfirst/findnext deterministic? (same order each time)?
- Message-ID: <JViRwB4w165w@vsystem.wimsey.bc.ca>
- Date: Sat, 02 Jan 93 10:36:30 PST
- References: <1993Jan2.071846.22403@netcom.com>
- Organization: Vandenberg Systems Research, Vancouver BC
- Lines: 26
-
- pdh@netcom.com (Phil Howard ) writes:
-
- > raymond@kronos.arc.nasa.gov (Eric A. Raymond) writes:
- >
- > >Are the DOS findfirst/findnext directory functions deterministic.
- > >That is, will they report the files in the same order for a given
- > >disk?
- >
- > Not unless the files are on there in exactly the same order. You get
- > the files in the order they are in the directory data blocks themselves.
- > I am working on a program where I want the files in a more deterministic
- > way, and I sort them myself.
-
- To expand on this, if you take directory with no files in it, then add
- files a,b,c,d and e, they will be accessed in the order a,b,c,d,e.
- Fine. Now delete file c. The order is now a,b,d,e. Now create a new
- file f. The order will be a,b,f,d,e. This is because creating file f
- uses the first free directory entry, which was freed by deleting file c.
-
- Rick
-
- --
- Rick Vandenberg rick@vsystem.wimsey.bc.ca
- Vandenberg Systems Research For more information about V-MailServer
- 204 - 2255 West 5th Ave. send a blank e-mail to
- Vancouver, BC V6K 4K1 vmail-info-request@vsystem.wimsey.bc.ca
-