Trouble using createFileAtPath method to create file
Trouble using createFileAtPath method to create file
- Subject: Trouble using createFileAtPath method to create file
- From: "Jaime Rios" <email@hidden>
- Date: Fri, 12 Oct 2007 10:10:39 -0400
Hi,
I'm having trouble using the createFileAtPath method to create a file in the
following directory:
/private/var/tmp/folders.501/Cleanup At Startup
The code that I am using to attempt creating the file is:
NSString* pFP = [(NSString*)sourcePath stringByAppendingPathComponent:
[NSString stringWithCString:fileName encoding:30]];
BOOL bRes = NO;
if ( (bRes=[[NSFileManager defaultManager] createFileAtPath:pFP
contents:nil attributes:nil]) == YES)
return true;
else
return false;
The code cannot create the file in the private folder, but if I change the
path to the home directory, I am able to create the file. What has to be
done in order to create a file in the "/private/var/tmp/folders.501/Cleanup
At Startup" directory? Thanks in advance!
--
-Jaime
http://www.jaimerios.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden