• 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: create a directory (UTF8 string) in cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create a directory (UTF8 string) in cocoa


  • Subject: Re: create a directory (UTF8 string) in cocoa
  • From: Citizen <email@hidden>
  • Date: Thu, 22 May 2008 01:24:23 +0100

On 22 May 2008, at 01:12, Wayne Shao wrote:

How do I create a new directory in Cocoa?

e.g, ~/a/b exists and I want to create ~/a/b/c/d/file.txt. So I need to
something equivalent to mkdir -p ~/a/b/c/d


I could only fine mkdir() in C. Is there anything in Cocoa?


NSFileManager has two methods -

createDirectoryAtPath:attributes:
createDirectoryAtPath:withIntermediateDirectories:attributes:error:

The second was introduced in 10.5

- Dave
------
David Kennedy (http://www.zenopolis.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


References: 
 >create a directory (UTF8 string) in cocoa (From: "Wayne Shao" <email@hidden>)

  • Prev by Date: Re: create a directory (UTF8 string) in cocoa
  • Next by Date: Re: fundamental question: how do I call controller methods from other classes?
  • Previous by thread: Re: create a directory (UTF8 string) in cocoa
  • Next by thread: Re: create a directory (UTF8 string) in cocoa
  • Index(es):
    • Date
    • Thread