Mac::Files - Macintosh Toolbox Interface to the File and Alias Manager
Constants for file access permissions. Use these constants to request a type of access to a file or fork, or to deny a type of access to a file or fork to other paths that may request access.
Note that it is possible, on Mac OS 8 and 9, to open a file residing on read-only media with write access. On Mac OS X, however, you cannot open a file with write access on read-only media; the attempt to open the file fails with a wrPermErr error.
Requests whatever permissions are currently allowed. If write access is unavailable (because the file is locked or the file is already open with write permission), then read permission is granted. Otherwise read/write permission is granted.
Requests permission to read the file.
Requests permission to write to the file. If write permission is granted, no other access paths are granted write permission. Note, however, that the File Manager does not support write-only access to a file. Thus, fsWrPerm is synonymous with fsRdWrPerm.
Requests exclusive read and write permission. If exclusive read/write permission is granted, no other users are granted permission to write to the file. Other users may, however, be granted permission to read the file.
Requests shared read and write permission. Shared read/write permission allows mutliple access paths for reading and writing. This is safe only if there is some way of locking portions of the file before writing to them. Use the functions PBLockRangeSync and PBUnlockRangeSync to lock and unlock ranges of bytes within a file. On Mac OS 8 and 9, these functions are supported only on remotely mounted volumes, or on local volumes that are shareable on the network. You should check that range locking is available before requesting shared read/ write permission. On Mac OS X, range locking is available on all volumes.
Requests that any other paths be prevented from having read access. A path cannot be opened if you request read permission (with the fsRdPerm constant) but some other path has requested deny-read access. Similarly, the path cannot be opened if you request deny-read permission, but some other path already has read access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
Requests that any other paths be prevented from having write access. A path cannot be opened if you request write permission (with the fsWrPerm constant) but some other path has requested deny-write access. Similarly, the path cannot be opened if you request deny-write permission, but some other path already has write access. This constant is used with the PBHOpenDenySync and PBHOpenRFDenySync functions.
ioFlAttrib bits, returned by FSpGetCatInfo.
Set if file or directory is locked
Set if resource fork is open
Set if data fork is open
Set if this is a directory
Set if AppleShare server "copy-protects" the file
Set if file (either fork) is open
Set if the directory is within a shared area of the directory hierarchy
Set if the directory is a share point that is mounted by some user
Set if the directory is a share point
Finder flags
Files and folders (System 6)
Files and folders; bit 0x0020 was kRequireSwitchLaunch, but is now reserved for future use
Files only (Applications only); if clear, the application needs to write to its resource fork, and therefore cannot be shared on a server
Files only (Extensions/Control Panels only); this file contains no INIT resource
Files only; clear if the file contains desktop database; resources ('BNDL', 'FREF', 'open', 'kind'...) that have not been added yet. Set only by the Finder; reserved for folders - make sure this bit is cleared for folders; bit 0x0200 was the letter bit for AOCE, but is now reserved for future use
Files and folders
Files only
AppleTalk/GetAliasInfo Constants
Return AppleTalk zone name from GetAliasInfo.
Return AppleTalk server name from GetAliasInfo.
Return volume name from GetAliasInfo.
Return last component of target file name from GetAliasInfo.
Return name of enclosing folder from GetAliasInfo. This index value is 1. Higher indices will return folder names higher up the hierarchy.
Folder type constants. Specify a type of folder on a particular volume. Use in vRefNum parameter of FindFolder().
previously was 0x8000 but that is an unsigned value whereas vRefNum is signed
Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk.
Folder Domains - Carbon only. The constants above can continue to be used, but the folder/volume returned will be from one of the domains below.
Read-only system hierarchy.
All users of a single machine have access to these resources.
All users configured to use a common network server has access to these resources.
Read/write. Resources that are private to the user.
Domain referring to the currently configured Classic System Folder
The ID of the last domain in the above list, used by the Folder Manager to determine if a given parameter should be treated as a domain or a volume...
Constants for createFolder parameter of FindFolder().
Folder Type Constants for FindFolder().
the system folder
the desktop folder; objects in this folder show on the desk top.
the desktop folder at the root of the hard drive, never the redirected user desktop folder
the trash folder; objects in this folder show up in the trash
the trash folder at the root of the drive, never the redirected user trash folder
the "empty trash" folder; Finder starts empty from here down
Print Monitor documents
Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here
Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here
Finder objects to put into the Apple menu go here
Control Panels go here (may contain INITs)
System control panels folder - never the redirected one, always "Control Panels" inside the System Folder
System extensions go here
Fonts go here
preferences for applications go here
System-type Preferences go here - this is always the system's preferences folder, never a logged in user's
temporary files go here (deleted periodically, but don't rely on it.)
New Constants
root folder of a volume
items deleted at boot
third-party items and folders
encoding tables
stationery
OpenDoc root
OpenDoc Shell Plug-Ins in OpenDoc folder
OpenDoc editors in Mac OS Folder
OpenDoc subfolder of Editors folder
OpenDoc libraries folder
CKH general editors folder at root level of Sys folder
CKH help folder currently at root of system folder
CKH internet plug ins for browsers and stuff
CKH modem scripts, get 'em OUT of the Extensions folder
CKH new folder at root of System folder for printer descs.
CKH new folder at root of System folder for printer drivers
CKH at root of system folder
CKH for general shared libs.
CKH macintalk can live here
CKH for control strip modules
SJF for Assistants (Mac OS Setup Assistant, etc)
SJF for Utilities folder
SJF for Apple Extras folder
SJF for Contextual Menu items
SJF for Mac OS ReadMes folder
EAS for Location Manager Module files except type 'thng' (within kExtensionFolderType)
EAS for Location Manager Preferences (within kPreferencesFolderType; contains kALMLocationsFolderType)
EAS for Location Manager Locations (within kALMPreferencesFolderType)
for ColorSyncª Profiles
for Theme data files
Favorties folder for Navigation Services
Internet folder (root level of startup volume)
Appearance folder (root of system folder)
Sound Sets folder (in Appearance folder)
Desktop Pictures folder (in Appearance folder)
Internet Search Sites folder
Find support folder
Find by content folder
Installer Logs folder
Scripts folder
Folder Actions Scripts folder
Launcher Items folder
Recent Applications folder
Recent Documents folder
Recent Servers folder
Speakable Items folder
Keychain folder
QuickTime Extensions Folder (in Extensions folder)
Display Extensions Folder (in Extensions folder)
Multiprocessing Folder (in Extensions folder)
Printing Plug-Ins Folder (in Extensions folder)
New Folder Types to accommodate the Mac OS X Folder Manager These folder types are not applicable on Mac OS 9.
The top-level of a Folder domain, e.g. "/System"
the Library subfolder of a particular domain
Contains ColorSync-related folders
ColorSync CMMs
ColorSync Scripting support
Contains Printing-related folders
Contains Speech-related folders
Contains Carbon-specific file
Contains Documentation files (not user documents)
Contains Developer Documentation files and folders
Contains Developer Help related files
Contains Internet Search Sites downloaded from the Internet
Contains temporary items created on behalf of the current user
Contains various cache files for different clients
Contains Mac OS X Framework folders
Contains Mac OS X Private Framework folders
Mac OS 9 compatible desktop folder - same as kSystemDesktopFolderType but with a more appropriate name for Mac OS X code.
Contains Mac OS X Developer Resources
Contains Mac OS X System Sound Files
Contains Mac OS X components
Contains QuickTime components for Mac OS X
Refers to the "CoreServices" folder on Mac OS X
Refers to the "Pictures" folder in a users home directory
Refers to the "Movies" folder in a users home directory
Refers to the "Music" folder in a users home directory
Refers to the "Sites" folder in a users home directory
Refers to the "Public" folder in a users home directory
Refers to the Audio support folder for Mac OS X
Refers to the Sounds subfolder of Audio Support
Refers to the Banks subfolder of the Sounds Folder
Refers to the Alert Sounds subfolder of the Sound Folder
Refers to the Plug-ins subfolder of the Audio Folder
Refers to the Components subfolder of the Audio Plug-ins Folder
Refers to the Kernel Extensions Folder on Mac OS X
Refers to the Directory Services folder on Mac OS X
Refers to the Directory Services Plug-Ins folder on Mac OS X
Refers to the "Receipts" folder in Mac OS X
Refers to the [domain]/Library/Filesystems folder in Mac OS X
Refers to the [domain]/Library/Filesystems/AppleShare folder in Mac OS X
Refers to the [domain]/Library/Filesystems/AppleShare/Authentication folder in Mac OS X
Refers to the MIDI Drivers folder on Mac OS X
Refers to the [domain]/Library/KeyboardLayouts folder in Mac OS X
Refers to the [domain]/Library/Indexes folder in Mac OS X
Refers to the [domain]/Library/Indexes/FindByContent folder in Mac OS X
Refers to the Managed Items folder for Mac OS X
Refers to the "StartupItems" folder of Mac OS X
More Folder Constants
PKE for Locales folder
Find By Content Plug-ins
"Users" folder, contains one folder for each user.
The folder for the currently logged on user.
The remote folder for the currently logged on user
The remote folder location for the currently logged on user
A Shared "Documents" folder, readable & writeable by all users
Volume specific user information goes here
Appleshare puts volumes to automount inside this folder.
The "Applications" folder, pre Mac OS 9.1
The "Installer Logs" folder, pre Mac OS 9.1
The "Assistants" folder, pre Mac OS 9.1
The "Utilities" folder, pre Mac OS 9.1
The "Apple Extras" folder, pre Mac OS 9.1
The "Mac OS ReadMes" folder, pre Mac OS 9.1
The "Internet" folder, pre Mac OS 9.1
The "Servers" folder, pre Mac OS 9.1
The "Stationery" folder, pre Mac OS 9.1
Written by Matthias Ulrich Neeracher <neeracher@mac.com>. Currently maintained by Chris Nandor <pudge@pobox.com>.
2 POD Errors
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'ColorSyncª'. Assuming CP1252
Unknown directive: =include
To install Mac::Carbon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::Carbon
CPAN shell
perl -MCPAN -e shell install Mac::Carbon
For more information on module installation, please visit the detailed CPAN module installation guide.