home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15024 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.5 KB

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!jsp
  2. From: jsp@uts.amdahl.com (James Preston)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: vrefNum from Path Name
  5. Message-ID: <25rU03zf79dw00@amdahl.uts.amdahl.com>
  6. Date: 5 Sep 92 00:05:53 GMT
  7. References: <47022@shamash.cdc.com> <Btwwt5.7Bv@taligent.com> <14960@borg.cs.unc.edu> <47148@shamash.cdc.com>
  8. Reply-To: jsp@pls.amdahl.com
  9. Distribution: usa
  10. Organization: Amdahl Corporation, Sunnyvale CA
  11. Lines: 23
  12.  
  13. paul@svl.cdc.com (Paul Kohlmiller) writes:
  14.  
  15. }lari@strauss.cs.unc.edu (Humayun Lari) writes:
  16.  
  17. }>In article <Btwwt5.7Bv@taligent.com> keith@taligent.com (Keith Rollin) writes:
  18. } [says to always use FSMakeFSSpec and not create a FSSpec on your own.]
  19. }>What about when the file/directory you're referring to does not exist?
  20. }>If I remember correctly, FSMakeFSSpec checks to make sure that it does, so
  21. }>it would return an error code when you're trying to create an FSSpec prior to
  22. }>performing a Save As... Or am I wrong about this? Keith?
  23.  
  24. }My reading of IM6 seems to say that you will get an error but the
  25. }FSSpec is still good. Haven't tried it.
  26. }Other Opinions welcome.
  27.  
  28. I can vouch for this.  FSMakeFSSpec returns the file not found error, but
  29. goes ahead and makes a valid FSSpec for the missing file (i.e. the vRefNum
  30. and dirID fields reference the correct folder, and the name field contains
  31. the name of the non-existant file).  A very handy feature.  But do remember
  32. that FSSpecs are only found on System 7.
  33.  
  34. --James Preston
  35.  
  36.