home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!usenet
- From: Michael Babin
- Subject: Re: vrefNum from Path Name
- Message-ID: <1992Sep3.144223.4118@csc.ti.com>
- Sender: usenet@csc.ti.com
- Nntp-Posting-Host: 192.153.237.11
- Organization: Texas Instruments
- References: <47022@shamash.cdc.com> <Btwwt5.7Bv@taligent.com> <14960@borg.cs.unc.edu>
- Distribution: usa
- Date: Thu, 3 Sep 1992 14:42:23 GMT
- Lines: 28
-
- In article <14960@borg.cs.unc.edu> lari@strauss.cs.unc.edu (Humayun Lari)
- writes:
- >In article <Btwwt5.7Bv@taligent.com> keith@taligent.com (Keith Rollin) writes:
- >>Remember, Inside Mac says that you should _NOT_ create FSSpecs by hand. You
- >>should always call FSMakeFSSpec. Don't go filling in the parID and vRefNum
- >>fields yourself. (There is one exception to this, which is that you can
- freely
- >>assign one FSSpec record to another.)
- >
- >What about when the file/directory you're referring to does not exist?
- >If I remember correctly, FSMakeFSSpec checks to make sure that it does, so
- >it would return an error code when you're trying to create an FSSpec prior to
- >performing a Save As... Or am I wrong about this? Keith?
- >
- >Humayun Lari
- >(lari@cs.unc.edu)
- >
-
- You are correct. FSMakeFSSpec returns an fnfErr (file not found, -43) in this
- case. It also creates the FSSpec record for you. Since you are performing a
- Save As..., check for this return value to warn the user about overwriting an
- existing file. If they proceed with the overwrite, use the FSSpec in good
- health!
-
- Mike Babin
- babin@lobby.ti.com
-
-
-