[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSDirectoryEnumerator
From: |
Enrico Sersale |
Subject: |
NSDirectoryEnumerator |
Date: |
Thu, 30 Sep 2004 21:42:44 +0300 |
Today, only to test how much time this keeps, I've tryed to create a NSArray
with all the directories on my disk.
The code is very simple, something like this:
NSMutableArray *paths = [NSMutableArray array];
NSDirectoryEnumerator *enumerator = [fm enumeratorAtPath: @"/"];
NSString *path;
while ((path = [enumerator nextObject])) {
if ([[enumerator fileAttributes] fileType] == NSFileTypeDirectory) {
[paths addObject: path];
}
}
Then I save the array in a file;
But I'm noticing that many, many directories are missing; for example, in /usr,
I get only two entries, /usr/bin and /usr/lib; all the other are missing.
Can somebody test this?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- NSDirectoryEnumerator,
Enrico Sersale <=