PBHGetDirAccessSync
PBHGetDirAccess Get access control information for a shared HFS volume
#include <Files.h> File Manager (PBxxx)
OSErr PBHGetDirAccess(pb, async );
HParmBlkPtr pb ; address of a 48-byte AccessParam structure
Boolean async ; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PBHGetDirAccess obtains access control information for a specific folder
including the folder owner's ID and the ID of the folder's primary group.
pb is the address of a 48-byte AccessParam structure. The following
fields are relevant:
Out-In Name Type Size Offset Description
-> ioCompletion ProcPtr 4 12 Completion routine address (if async =TRUE)
<- ioResult OSErr 2 16 Error Code (0=no error, 1=not done yet)
-> ioNamePtr long 4 18 Name of the directory
-> ioVRefNum short 2 22 Volume reference
<- ioACOwnerID long 4 36 Owner identification
<- ioACGroupID long 4 40 Identification of folder's primary group
<- ioACAccess long 4 44 Folder access rights
-> ioDirID long 4 48 Identification number of directory
async is a Boolean value. Use FALSE for normal (synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
nsvErr (-35) No such volume
fnfErr (-43) Not a valid directory
paramErr (-50) No default volume
accessDenied (-5000) User access privileges incorrect to look at directory

Notes: The ioDirID and the ioNamePtr parameters work jointly to pinpoint a
specific directory while ioACOwnerID, ioACGroupID and ioACAccess combine
to give you evidence of the folder's owner, its primary group and how its
access rights are specified, i.e, User's rights, Everyone's right's, Group's
right's or Owner's rights. The AccessParam data structure description
includes a diagram of the format.