• 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 new folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create new folder


  • Subject: Re: create new folder
  • From: Brian Ganninger <email@hidden>
  • Date: Tue, 30 Dec 2003 16:20:04 -0600

Easy answer: NSFileManager.

Code answer: [[NSFileManager defaultManager] createDirectoryAtPath@"/foo" attributes:nil]; // set attributes as you will, see docs for info.

To check:
BOOL *isDir;
[[NSFileManager defaultManager] fileExistsAtPath:@"/foo" isDirectory:&isDir];
// note that & indicates a reference to a variable for an indirect return

HTH,
brian ganninger

On Dec 30, 2003, at 3:53 PM, Jay Rimalrick wrote:

is there an easy way creat a new folder in objective-c code?

and check to see of that folder has already been created?

thanks,
jay




________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
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.
_______________________________________________
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.

References: 
 >create new folder (From: "Jay Rimalrick" <email@hidden>)

  • Prev by Date: Re: Multiple declarations for method length
  • Next by Date: Re: Multiple declarations for method length
  • Previous by thread: create new folder
  • Next by thread: Fwd: WebServices Question (plus some additional details)
  • Index(es):
    • Date
    • Thread