New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Traverse folders and files using XCode


Post Reply New Thread Subscribe

 
Thread Tools
Srinivas

 
Member Since: Jun 03, 2010
Posts: 1
Srinivas is on a distinguished road

Srinivas is offline
Hi

I am a newbie in Mac and XCode development

I have an urgent requirement where i need to traverse the files and folders in the specified path given

Ex:

I have a folder "Temp" under /Users/

which should look similar to this /Users/Temp/

Under the Temp folder i have "Additional" another folder

which should look similar to this /Users/Temp/Additional/

Under the Additional folder i have 5 files (assume)
which might me something similar to this

/Users/Temp/Additional/Temp1.txt
/Users/Temp/Additional/Temp2.txt
/Users/Temp/Additional/Temp3.txt
/Users/Temp/Additional/Temp4.txt
/Users/Temp/Additional/Temp5.txt

If the input folder is set as /Users/Temp/

I should get the list of folders like Additional and the files under it

Any help would be great

Thanks
Sri
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
You want to look at NSFileManager and I think the enumeratorAtPath: method.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks

Post Reply New Thread Subscribe


« Draw text centered in Custom view | Packagemaker command line on 10.6 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Time Machine Files & Folders Question The_Grudge OS X - Operating System 5 12-14-2009 09:54 PM
dvd.media files seen as folders irnside OS X - Operating System 1 11-21-2009 12:10 PM
FTP can't open folders, just files phanh OS X - Apps and Games 0 10-20-2008 11:40 PM
Files and Folders Permission hviado OS X - Operating System 1 06-16-2007 09:41 AM
Newbie question: Can you list folders before files? acmultimedia Switcher Hangout 3 02-01-2007 06:25 PM

All times are GMT -4. The time now is 04:33 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?