Re: NSFIleManager enumeratorAtPath problem


Sak Wathanasin
 

Can anyone spot the problem
In the code you posted, there was no check for the value of myFolderFlag
on return from fileExistsAtPath:, so are you sure it's a directory? Doc
for enumeratorAtPath: says:

"Return Value
An NSDirectoryEnumerator object that enumerates the contents of the
directory at path.

If path is a filename, the method returns an enumerator object that
enumerates no files—the first call to nextObject will return nil."

Regards
Sak Wathanasin
Network Analysis Ltd

Join cocoa@apple-dev.groups.io to automatically receive all group messages.