Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-30-2009, 06:47 PM   #1 (permalink)
Large Member
 
Join Date: Aug 2008
Location: London
Posts: 312
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
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,333
Threads: 39,129
Posts: 171,562
Top Poster: smasher (2,577)
Welcome to our newest member, SteveMc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:30 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0