A member of Xojo team gave me the solution with Declare, but I think a FolderItem.IsPackage would be welcome.
There are many package ( . app , .rtfd and so on) which may be considered as file by our program (when we through each item of a folder).
When the Lib will be deprecated, I will have to ask again help to find news Declare instructions.