objective c - Folders (directories) not being detected properly -


I am seeing error with 'bug standard' purpose-folder identification code. I am scanning files and folders with a given path and keeping count of how many files are present and how many folders are present.

Strangely, I'm actually counting another folder instead of being present!

By looking at each file / folder name through the routine, proceeding through the routine shows that if there is an object file or folder, then any file is showing a folder Passing the test?!? !?

The file that was found incorrectly is an 'RTF attachment' file type. I have not yet checked the other folders to see if there are more file types that are themselves Can report incorrectly.

In addition to this file, everything in my program is working properly.

Do anyone have any ideas that I am doing wrongly? Or is this a known bug in Objective-C?

Here is a part of the code using:

  BOOL isDir; NSString * file; NSString * docsDir = [auto path]; NSFileManager * manager = [NSFileManager defaultManager]; NSDirectoryEnumerator * dirEnum = [Manager EnumatorEat Path: DocsDeir]; NSDictionary * FAT; // (Only showing up important announcements above), while (file = [direction next object]) {// if user has clicked on the Abert button, break the loop (abortflag); If ([Exclude exclusion states] == NSOSTST) {[Dryanum Skip Dissents]; } If ({Manager filesexists atpeth: [docsidir stringbafensepantcomponent: file] the directory: & amp; idir; and adiIr) {++ directory; If ([Exclude exclusion states] == NSOSTST) {continue; }}} // ... a group of other stuff, etc., etc ...  

The RTFD files are actually bundles, which are just fancy directories. You can verify this by right-clicking on your RTFD file and selecting "Show Package Contents" option.

If you are writing it on Mac OS X, then you can use these bundles to identify them.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -