Re: NSFileManager, 10.3.x and /tmp: bug?
Re: NSFileManager, 10.3.x and /tmp: bug?
- Subject: Re: NSFileManager, 10.3.x and /tmp: bug?
- From: Chris Parker <email@hidden>
- Date: Sun, 16 Jan 2005 11:18:21 -0800
On Jan 16, 2005, at 9:57 AM, Jim Correia wrote:
On Jan 16, 2005, at 12:07 PM, John Stiles wrote:
I think you might want FSFindFolder. It will return a path to
"/tmp/501/Temporary Items/", and guarantees that the path it gives
you exists. You will need to call FSRefMakePath to convert its return
value to a path.
NSTemporaryDirectory() is the Cocoa equivalent of FSFindFolder with
the temporary directory constant. (In fact, in its current
implementation, it returns the exact same directory. You shouldn't
reply on that though - just that it will return you a directory
suitable for putting temp files in.)
Jim is correct here. For various reasons, the NSTemporaryDirectory()
function changed in Panther to return essentially what FSFindFolder()
would when you pass it the "create directory" flags.
I'll look in to what Stéphane is seeing when I get back to my desk, but
if you wish to be able to just have a temp directory for the user
you're logged in as, calling NSTemporaryDirectory() directly should do
what Stéphane appears to want...
.chris
--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden