1File::HomeDir::Darwin(3U)ser Contributed Perl DocumentatiFoinle::HomeDir::Darwin(3)
2
3
4
6 File::HomeDir::Darwin - find your home and other directories, on Darwin
7 (OS X)
8
10 This module provides Darwin-specific implementations for determining
11 common user directories. In normal usage this module will always be
12 used via File::HomeDir.
13
14 Note -- since this module requires Mac::Carbon and Mac::Carbon does not
15 work with 64-bit perls, on such systems, File::HomeDir will fall back
16 to File::HomeDir::Unix instead.
17
19 use File::HomeDir;
20
21 # Find directories for the current user
22 $home = File::HomeDir->my_home; # /Users/mylogin
23 $desktop = File::HomeDir->my_desktop; # /Users/mylogin/Desktop
24 $docs = File::HomeDir->my_documents; # /Users/mylogin/Documents
25 $music = File::HomeDir->my_music; # /Users/mylogin/Music
26 $pics = File::HomeDir->my_pictures; # /Users/mylogin/Pictures
27 $videos = File::HomeDir->my_videos; # /Users/mylogin/Movies
28 $data = File::HomeDir->my_data; # /Users/mylogin/Library/Application Support
29
31 · Fallback to Unix if no Mac::Carbon available
32
33 · Test with Mac OS (versions 7, 8, 9)
34
35 · Some better way for users_* ?
36
37
38
39perl v5.12.0 2009-03-27 File::HomeDir::Darwin(3)