Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

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


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.
-->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.

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 macroSelector
_HFSDispatch$0032

RESULT CODES
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