• 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
Re: Trouble using createFileAtPath method to create file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble using createFileAtPath method to create file


  • Subject: Re: Trouble using createFileAtPath method to create file
  • From: "Jaime Rios" <email@hidden>
  • Date: Mon, 15 Oct 2007 11:09:40 -0400

Yes, the "Cleanup At Startup" folder exists prior to me trying to create the
file.


--
-Jaime
http://www.jaimerios.com

On 10/12/07, Emanuele ∞ Vulcano <email@hidden> wrote:
>
>
> Il giorno 12/ott/07, alle ore 16:27, Jaime Rios ha scritto:
>
> > NSString* pFP = [(NSString*)CFURLCopyPath(sourcePath)
> > stringByAppendingPathComponent:
> >         (NSString*)fileName];
>
> This is bad because it will leak a string. Core Foundation does not
> follow the same rules as Cocoa; in particular *Copy* functions work
> like Cocoa's init methods.
>
> More correct:
>
> NSString* pFPPrefix = [(NSString*) CFURLCopyPath(sourcePath)
> autorelease];
> NSString* pFP = [pFPPrefix stringByAppending...];
>
> Back to your original problem: does the folder whose path is pFP
> actually *exist* before you try to create a file in it?
>
>   - ∞
>
>
_______________________________________________

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: "Jaime Rios" <email@hidden>
References: 
 >Trouble using createFileAtPath method to create file (From: "Jaime Rios" <email@hidden>)
 >Re: Trouble using createFileAtPath method to create file (From: glenn andreas <email@hidden>)
 >Re: Trouble using createFileAtPath method to create file (From: "Jaime Rios" <email@hidden>)

  • Prev by Date: Re: Simple dealloc question
  • Next by Date: Re: Trouble using createFileAtPath method to create file
  • Previous by thread: Re: Trouble using createFileAtPath method to create file
  • Next by thread: Re: Trouble using createFileAtPath method to create file
  • Index(es):
    • Date
    • Thread