home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3068 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  1.6 KB

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