Platforms to show: All Mac Windows Linux Cross-Platform
Back to FolderItem class.
FolderItem.SetFolderFlagsMBS(flags as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Files | MBS MacClassic Plugin | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Sets the frFlags of a folder. Returns an error code (or zero if no error occured). Possible error conditions include "disk is write protected" and "folder not found".
When changing flags of a folder, use GetFolderFlags to get the original flags, then clear or set the flags by using BitwiseAnd and BitwiseOr and call SetFolderFlags to set the new flags.
with values 2, 4 and 8 in the flags, you control the label color in Finder. Example code above uses 4 which is green by default.
If you need to set bundle bit in newer projects, please use SetResourcePropertyForKey on CFURLMBS class with kCFURLIsPackageKey key.
Some examples using this method:
Blog Entries
The items on this page are in the following plugins: MBS MacClassic Plugin.