FolderItem methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.PermissionsMBS(OldWay as boolean) as PermissionsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS MacOSX Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an object for the Permissions of a file.
Example
dim f as FolderItem
dim p as PermissionsMBS

f=GetOpenFolderItem("special/any")

if f<>nil then
p=f.PermissionsMBS(true)

if p<>Nil then // requires Mac OS X
p.Access=&H6

// &h000006 = -rw-------
// &h000600 = ----rw----
// &h060000 = -------rw-

if 0=p.SetPermissions(true) then
MsgBox "Permissions set"
else
MsgBox "Permissions could not be set"
end if
else
MsgBox "We require Mac OS X"
end if
else
' nothing selected
end if

You can use old API if you set Oldway=true. Than you set access value like in older version of the plugin.
If you set Oldway = false, you use the newer API which set unix permissions, but not the old ones.
The old way is not supported for 64bit.

Some examples using this method:

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


💬 Ask a question or report a problem