> Am 03.10.2019 um 18:38 schrieb Marnaud <anic...@mac.com>:
> 
> Hello,
> 
> PermissionsMBS.Access is only set if using the “older” API; older API is 
> available only in 32 bit. I'm making an app where I want to check 
> user/group/other permissions; it is a 64 bit app. Should I rely on the shell?

Well, I tried to migrate PermissionsMBS to newer API.

> On the same subject, the documentation doesn't look clear to me, as to what 
> is the difference between the “old” and “new” API. The only “relevant” 
> information is: “If you set Oldway = false, you use the newer API which read 
> unix permissions, but not the old ones.”, which doesn't tell more than the 
> obvious: what's the old and new unix permissions? Is that ACLs?

The old AppleShare permissions are still available via old API, but it may be 
better to move to POSIX permissions.

e.g.

Dim file As FolderItem = SpecialFolder.Desktop.Child("test.rtf")
Dim fileManager As New NSFileManagerMBS

dim error as NSErrorMBS
Dim Values As Dictionary = fileManager.attributesOfItemAtPath(file, error)
Dim Permissions As Integer = Values.Value(fileManager.NSFilePosixPermissions)

MsgBox "POSIX Permissions: "+oct(Permissions)

MsgBox "Owner: "+_
  values.Value(fileManager.NSFileOwnerAccountID)+_
  " "+_
  values.Value(fileManager.NSFileOwnerAccountName)

MsgBox "Group: "+_
  values.Value(fileManager.NSFileGroupOwnerAccountID)+_
  " "+_
  values.Value(fileManager.NSFileGroupOwnerAccountName)

Maybe that helps?

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/



_______________________________________________
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to