Distinguishing bundles and folders

I am working on a file tree view using FolderItem.Item and FolderItem.Item.Directory but it does not make the difference between a regular folder and an application. So all applications are (rightfully so) seen as folders.

Up to now I have simply sorted apps and folders by checking the name termination as “.app” and it works, but I want to make sure I did not overlook some evident other way.

Any comment will be appreciated.

TIA

This has been asked before, so here’s a few answers:

[quote=100171:@Joe Ranieri]This has been asked before, so here’s a few answers:

Thank you Joe. I did not remember.

Keep in mind applications aren’t the only thing bundled.
Pages, GarageBand, and Keynote (to name a few) savefiles are actually bundles.

Hi, long years ago I found the solution to olds systems, and someone here gave me the solution for newers systems. I’m on iPad at the hostel and it’s not easy to search, but I think “package” was in the subject of the thread on this forum.
Or go to my page http://throb.pagesperso-orange.fr/site/index.html and download “zz_external” at the bottom, the method for package is inside.

Note : I wanted to edit and I deleted, very hard to do this on iPad. :confused:

I think we have a function IsBundleMBS on the folderitem class.

I found it and applied it. Thank you :slight_smile:

[quote=100210:@Tim Parnell]Keep in mind applications aren’t the only thing bundled.
Pages, GarageBand, and Keynote (to name a few) savefiles are actually bundles.[/quote]

You are right. Recent Pages documents are indeed bundles. They where not in the previous version.

I want to build a filetree out of the Applications folder, where there are both apps and folders, but normally not documents.

Sorry, as I was on iPad I didn’t see the link Joe Ranieri gave was the one I was speaking about.