How to reject some items from a folder

Sorry for the potentially misleading subject title.

In a multimedia (!) project, I search beside the application about “library” folders. And so, I want to exclude any bundle items (they appears as folders for Xojo).

BUT, I want to be able to load rtfd files for example (different location, but same problem).

Of course, a series of If can make the trick, but the execution time and readability will suffer; at last, I may forget to filter one or two (or more) items or - like I do before yesterday - filter out rtfd files (since I excluded folders (if Not FolderItem1.Directory Then …)

In short, is there’s a declare / extends, whatever… that allows me to do something like:

If Not FolderItem1.isBundle Then

or something similar ?

Since a bundle follows a strict structure you could check if a required file is in there or not?
According to
the Info.plist file is required and must be present in all bundles.
Create an extends method called isBundle and check for that file? :slight_smile:

But, I think an rtfd file isn’t a bundle but a package?

Albin, Jean-Paul: thank you.

Yes, a package.

je les confond toujours toutes les deux…

Tu n’es pas seul :slight_smile:

The joy of quests with Google !

Package search returned…” for example…

I found this on Bundle document (Apple):


bundle A directory that contains an Glossary and whose contents are organized in one of several ways recognized by the system.

display name A user-visible string displayed in place of an item’s actual name. Display names allow the user to customize the names of key items (like applications) without breaking parts of the system that rely on the original name.

framework A bundle structure containing a dynamic shared library and the header files and other resources to support that library.

information property list A specific type of property list that contains configuration information for a bundle. An information property list file must always have the name Info.plist. For more information, see Runtime Configuration Guidelines.

loadable bundle A bundle whose executable is designed to be loaded into memory dynamically by an application. Loadable bundles are also sometimes referred to as plug-ins.

package A directory that the Finder presents to the user as if it were a single file.

target An Xcode blueprint for creating a product. A target defines rules for compiling source files, copy resource files, and performing any other steps needed to build the resulting product.

versioned bundle A bundle that supports the inclusion of multiple versions of an executable and resources. Frameworks are the only type of bundle that support versions.