Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Shared Environment Routines / Controlling Directory Access


You can use the PBHGetDirAccess function to get the access control information for
a directory.

FUNCTION PBHGetDirAccess (paramBlock: HParmBlkPtr; 
                           async: Boolean): OSErr;
A pointer to an HFS parameter block.
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
-->ioNamePtrStringPtrA pointer to a pathname.
-->ioVRefNumIntegerA volume specification.
<--ioACOwnerIDLongIntThe owner ID.
<--ioACGroupIDLongIntThe group ID.
<--ioACAccessLongIntThe access rights.
-->ioDirIDLongIntThe directory ID.

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.

The trap macro and routine selector for PBHGetDirAccess are
Trap macroSelector

noErr0No error
fnfErr-43Directory not found
paramErr-50Function not supported by volume
afpAccessDenied-5000User does not have the correct access to the directory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996