Используйте NSFileManager
с NSDirectoryEnumerationSkipsHiddenFiles
.
Например:
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *theFiles = [fileManager contentsOfDirectoryAtURL:[NSURL fileURLWithPath:@"/Users/Anne/Desktop/"]
includingPropertiesForKeys:[NSArray arrayWithObject:NSURLNameKey]
options:NSDirectoryEnumerationSkipsHiddenFiles
error:nil];
NSLog(@"%@",theFiles);