Created
February 4, 2012 04:40
-
-
Save Azuritul/1735379 to your computer and use it in GitHub Desktop.
Walking directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Excerpt from : | |
* http://rosettacode.org/wiki/Walk_a_directory/Recursively#Objective-C | |
*/ | |
NSString *dir = NSHomeDirectory(); | |
NSDirectoryEnumerator *de = [[NSFileManager defaultManager] enumeratorAtPath:dir]; | |
NSString *file; | |
while ((file = [de nextObject])) | |
if ([[file pathExtension] isEqualToString:@"mp3"]) | |
NSLog(@"%@", file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment