NSDirectoryEnumerator
NSDirectoryEnumerator
- Subject: NSDirectoryEnumerator
- From: Brian Amerige <email@hidden>
- Date: Tue, 15 Aug 2006 15:54:48 -0400
I'm trying to use an NSDirectoryEnumerator to recursively delete a directory via FTP.
'dir' is the path to the selected folder.
NSFileManager *manager = [NSFileManager defaultManager]; NSDirectoryEnumerator *dirEnum = [manager enumeratorAtPath:dir]; id object; while (object = [dirEnum nextObject]) { //File or folder? if(![[object substringToIndex:1] isEqualToString:@"."]) { if([[[dir stringByAppendingPathComponent:object] pathExtension] isEqualToString:@""]) { [ftp deleteDirectory:object]; } else { [ftp deleteFile:object]; } } }
It doesn't seem to even get into the while loop, any ideas why? |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden