PBHGetDirAccess
You can use the PBHGetDirAccess function to get the access control information for
a directory.
FUNCTION PBHGetDirAccess (paramBlock: HParmBlkPtr;
async: Boolean): OSErr;
paramBlock
- A pointer to an HFS parameter block.
async
- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
| --> | ioCompletion | ProcPtr | A pointer to a completion routine. |
| <-- | ioResult | OSErr | The result code of the function. |
| --> | ioNamePtr | StringPtr | A pointer to a pathname. |
| --> | ioVRefNum | Integer | A volume specification. |
| <-- | ioACOwnerID | LongInt | The owner ID. |
| <-- | ioACGroupID | LongInt | The group ID. |
| <-- | ioACAccess | LongInt | The access rights. |
| --> | ioDirID | LongInt | The directory ID. |
DESCRIPTION
The PBHGetDirAccess returns access control information for the specified directory. On output, the ioACOwnerID field contains the ID of the directory's owner, and the ioACGroupID field contains the directory's primary group. The directory's access rights are encoded in the ioACAccess field. See "Directory Access Privileges," beginning on page 2-18, for a description of the ioACAccess field.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for PBHGetDirAccess are
| Trap macro | Selector |
| _HFSDispatch | $0032 |
RESULT CODES
| noErr | 0 | No error |
| fnfErr | -43 | Directory not found |
| paramErr | -50 | Function not supported by volume |
| afpAccessDenied | -5000 | User does not have the correct access to the directory |