• 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
Insuring a path exists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insuring a path exists


  • Subject: Insuring a path exists
  • From: "Mike O'Connor" <email@hidden>
  • Date: Tue, 08 Jun 2004 22:54:14 -0400

I have a path like this:

NSString* thePath=@"/Library/Application Support/MyApp/MySubfolder/file.typ"

I want to insure that folders MyApp and MySubfolder exist, so that when I do a writeToFile: using that path, it will succeed.

Is there a call I can make to insure the path exists, creating the folders if needed, or do I have to write some code going through the components of the path and doing it myself? TIA!
_______________________________________________
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.


  • Follow-Ups:
    • Re: Insuring a path exists
      • From: Ondra Cada <email@hidden>
    • Re: Insuring a path exists
      • From: David Sinclair <email@hidden>
    • Re: Insuring a path exists
      • From: Frank Fenn <email@hidden>
  • Prev by Date: Re: Retain cycle problem with bindings & NSWindowController
  • Next by Date: Re: Losing Focus
  • Previous by thread: Re: Losing Focus
  • Next by thread: Re: Insuring a path exists
  • Index(es):
    • Date
    • Thread