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

building a file path


  • Subject: building a file path
  • From: mathew <email@hidden>
  • Date: Sat, 24 Jan 2009 17:00:23 +1100

hello,

i'm writing some code that saves a file on the iphone,
there's no user intervention / file dialog involved.


so once i've found the documents directory

<code>

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

	if ([paths count] < 1)
	{
		//failed
		return;
	}

	NSString* path = [paths objectAtIndex:0];

</code>

should I just manually build a file path string by adding "/myfolder/ myfile.xml' to 'path'

or is there a correct way to do it that doesn't involve hard coding the slashes into the filepath?



cheers
thanks for your help

mathew
_______________________________________________

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: building a file path
      • From: Dave DeLong <email@hidden>
  • Prev by Date: Fwd: ibplugin - framework - application
  • Next by Date: addSubview bottleneck
  • Previous by thread: Re: Coverflow like background drawing?
  • Next by thread: Re: building a file path
  • Index(es):
    • Date
    • Thread