Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-30-2009, 06:47 PM   #1 (permalink)
QuantumDoja
Registered Member
 
Join Date: Aug 2008
Location: London/Peterborough
Posts: 562
QuantumDoja is on a distinguished road
Default Copy folder structure from resources to Documents directory

Hi, I have a structure like this in my resources folder in xcode, all files are included in the project:

/resources/
----images
--------1.png
--------2.png
----data.xml
----blah.xml

I want to copy this in one whole chunk to the documents folder on the iphone, I can do each one individually by looking for it in the nsbundle.

Code:
NSString *file = [[NSBundle mainBundle] pathForResource:@"1" ofType:@"png"];

BOOL succeeded = [fileManager copyItemAtPath:file toPath:newpath1 error:&err];
I want to copy it as a whole here:

Code:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
any ideas? or is it one at a time for me?
QuantumDoja is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,636
Threads: 94,098
Posts: 402,804
Top Poster: BrianSlick (7,990)
Welcome to our newest member, samdanielblr
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:54 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.