Carbon


Open Resource Permission Constants

Header: Files.h

enum {
    fsCurPerm = 0,
    fsRdPerm = 1,
    fsWrPerm = 2,
    fsRdWrPerm = 3,
    fsRdWrShPerm = 4,
    fsRdDenyPerm = 16,
    fsWrDenyPerm = 32
};

Constant descriptions

fsCurPerm

Use this value to request whatever permission is currently allowed. If write access is unavailable (because the file is locked or because the resource fork is already open with write access), then read permission is granted. Otherwise, read/write permission is granted.

fsRdPerm

Use this constant to request permission to read the file, and fsWrPerm to write to it. If write permission is granted, no other access paths are granted write permission.

fsWrPerm
fsRdWrPerm

Use this constant to request exclusive or shared read/write permission, respectively. If your application is granted exclusive read/write permission, no users are granted permission to write to the file; other users may, however, be granted permission to read the file. Shared read/write permission allows multiple access paths for writing and reading. Because the File Manager doesn’t support write-only access to a file, fsWrPerm is synonymous with fsRdWrShPerm.

fsRdWrShPerm

Use this constant to request exclusive or shared read/write permission, respectively. If your application is granted exclusive read/write permission, no users are granted permission to write to the file; other users may, however, be granted permission to read the file. Shared read/write permission allows multiple access paths for writing and reading. Because the File Manager doesn’t support write-only access to a file, fsWrPerm is synonymous with fsRdWrShPerm.

fsRdDenyPerm
fsWrDenyPerm

The FSpOpenResFile, HOpenResFile, and OpenRFPerm functions use these constants in their permission parameter to specify the access path permission for the resource fork.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)