Mac::SystemDirectory - Locate Mac OS X Standard System Directories
use Mac::SystemDirectory qw[:all]; print FindDirectory(NSDocumentDirectory);
Locate Mac OS X Standard System Directories
Usage
$path = FindDirectory(NSApplicationDirectory); @paths = FindDirectory(NSApplicationDirectory);
Arguments
Directory
"Directory" constant.
DomainMask
"DomainMask" constant. Defaults to NSUserDomainMask.
NSUserDomainMask
Returns
When called in scalar context this function returns the first matching directory. In list context it returns all matching directories. If no directories are found, undef is returned in a scalar context and an empty list in a list context.
The user’s home directory—the place to install user’s personal items (~). Available in Mac OS X v10.0 and later.
Local to the current machine—the place to install items available to everyone on this machine. Available in Mac OS X v10.0 and later.
Publicly available location in the local area network—the place to install items available on the network (/Network). Available in Mac OS X v10.0 and later.
Provided by Apple — can’t be modified (/System). Available in Mac OS X v10.0 and later.
All domains. Includes all of the above and future items. Available in Mac OS X v10.0 and later.
Supported applications (/Applications). Available in Mac OS X v10.0 and later.
Unsupported applications and demonstration versions. Available in Mac OS X v10.0 and later.
Developer applications (/Developer/Applications). Available in Mac OS X v10.0 and later.
System and network administration applications. Available in Mac OS X v10.0 and later.
Various user-visible documentation, support, and configuration files (/Library). Available in Mac OS X v10.0 and later.
Developer resources (/Developer). Deprecated: Beginning with Xcode 3.0, developer tools can be installed in any location. Available in Mac OS X v10.0 and later.
User home directories (/Users). Available in Mac OS X v10.0 and later.
Documentation. Available in Mac OS X v10.0 and later.
Document directory. Available in Mac OS X v10.2 and later.
Location of core services (System/Library/CoreServices). Available in Mac OS X v10.4 and later.
Location of user’s autosaved documents Documents/Autosaved Available in Mac OS X v10.6 and later.
Location of user’s desktop directory. Available in Mac OS X v10.4 and later.
Location of discardable cache files (Library/Caches). Available in Mac OS X v10.4 and later.
Location of application support files (Library/Application Support). Available in Mac OS X v10.4 and later.
Location of the user’s downloads directory. Available in Mac OS X v10.5 and later.
Location of Input Methods (Library/Input Methods) Available in Mac OS X v10.6 and later.
Location of user's Movies directory (~/Movies) Available in Mac OS X v10.6 and later.
Location of user's Movies directory (~/Music) Available in Mac OS X v10.6 and later.
Location of user's Movies directory (~/Pictures) Available in Mac OS X v10.6 and later.
Location of system's PPDs directory (Library/Printers/PPDs) Available in Mac OS X v10.6 and later.
Location of user's Public sharing directory (~/Public) Available in Mac OS X v10.6 and later.
Location of the PreferencePanes directory for use with System Preferences (Library/PreferencePanes) Available in Mac OS X v10.6 and later.
For use with NSFileManager method URLForDirectory:inDomain:appropriateForURL:create:error: Available in Mac OS X v10.6 and later.
All directories where applications can occur. Available in Mac OS X v10.0 and later.
All directories where resources can occur. Available in Mac OS X v10.0 and later.
None by default. Functions and constants can either be imported individually or in sets grouped by tag names. The tag names are:
:all
:DomainMask
:Directory
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/LowLevelFileMgmt/Articles/StandardDirectories.html
Christian Hansen, <chansen@cpan.org>
Copyright (C) 2009 by Christian Hansen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'user’s'. Assuming UTF-8
To install Mac::SystemDirectory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::SystemDirectory
CPAN shell
perl -MCPAN -e shell install Mac::SystemDirectory
For more information on module installation, please visit the detailed CPAN module installation guide.