Re: FSSpec from NSString Problems
Re: FSSpec from NSString Problems
- Subject: Re: FSSpec from NSString Problems
- From: Rosyna <email@hidden>
- Date: Sun, 26 Jan 2003 13:37:47 -0700
It means file not found or fnfErr. (MacErrors.h)
If you're doing this from NSSavePanel, then that path will not exist.
And you *cannot* get an FSRef from a nonexistent path.
what you need to do is make an FSRef to the parent folder -[filePath
stringByDeletingLastPathComponent], then call FSGetCatalogInfo with
kFSCatInfoNodeID and kFSCatInfoVolume. The node ID is the dirID of
the folder. the volume is the vRefNum. Pass these to FSMakeFSSpec
with the name of the file as a Pascal String. A pascal string is a
256 byte char array with the first element being the size of the
array.
Ack, at 1/26/03, Jonathan Sick said:
An example of an NSString returned by by NSSavePanel would be:
/Users/jsick/Movies/myMovie.mov
So when I do:
OSStatus status = FSPathMakeRef((unsigned const char *)[inPath
fileSystemRepresentation],&fsref, NULL);
The FSPathMakeRef returns an OSStatus value of -43. I'm not familiar
at all with OSStatus definitions. I did a search on Apple's site,
but couldn't find any info on a -43 error. Any pointers to
documentation on this error?
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
---
Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.