• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Trouble using createFileAtPath method to create file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Trouble using createFileAtPath method to create file
      • From: glenn andreas <email@hidden>
  • Prev by Date: a link as attribute in core data?
  • Next by Date: Re: Getting a NSMenuItem to respond to two different key equivalents
  • Previous by thread: Re: a link as attribute in core data?
  • Next by thread: Re: Trouble using createFileAtPath method to create file
  • Index(es):
    • Date
    • Thread