Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.VolGetFolderItemIDMBS(createFileIDs as Boolean = true) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacClassic Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the unique FileID or DirID of a FolderItem.

Returns the unique FileID or DirID of a FolderItem. This ID is unique over all items on the same volume. The value 2 always identifies the root directory, all negative values and positive ones above 15 are used for user-created files and folders, while the values 3-15 are used internally by the File System (for the Desktop Database, for example).
If the item does not exists, 0 (zero) is returned instead.

IDs for Folders can always be resolved back to a FolderItem using VolResolveID, while resolving FileIDs only works when they've previously been created explicitly. To create a resolvable FileID, pass true to the createFileIDs parameter. But be aware that if the FileID can not be created (because the disk is locked or because the File System Format does not support it), the call will fail and a zero will be returned!

So, if you are just interested in reading the FileID, pass false to the second parameter. This will not fail even there hasn't been created a resolvable ID for that file yet.

Blog Entries

The items on this page are in the following plugins: MBS MacClassic Plugin.


The biggest plugin in space...