1

Is there any chance to skip the hidden subfoldres using NSDirectoryEnumerator?

My code looks as the following:

NSFileManager *manager = [NSFileManager defaultManager]; 
NSString *file = nil;
NSDirectoryEnumerator* fileEnumerator=[manager enumeratorAtPath: pathName]; 
while ((file= [fileEnumerator nextObject])){
    if ([self.smetadataExtraction filterByextension:file]){
        ....
    } 
}

I know there is a chance to can skip the hidden subfolders using instead of enumeratorAtPath, enumeratorAtURL. Like in the following example:

Why is NSDirectoryEnumerator picking up hidden files here?

But is there any chance of doing it using enumeratorAtPath?

Community
  • 1
  • 1
user3009804
  • 329
  • 6
  • 19

0 Answers0