specialFolderPath("documents")

Jan Schenkel janschenkel at yahoo.com
Tue May 11 05:02:29 CDT 2004


--- paolo <carambola at aliceposta.it> wrote:
> How can I get the FolderPath of  folder  "documents"
>  on MAC OS X ?
> 
> Why there is not a  - specialFolderPath("documents")
> -  for MAC OS X?
> 
> ciao Paolo
> 

Hi Paolo,

>From the Transxcript Dictionary entry :
--
For Mac OS and OS X systems, you can also specify a
four-character special folder constant as the
folderIdentifier. You can find a list of these
constants on the Apple web site at
<http://developer.apple.com/techpubs/macosx/Carbon/Files/FolderManager/Folder_Manager/folder_manager_ref/constant_6.html#//apple_ref/c/tdef/FolderType>.
--

Clicking on  the link brings you to the apple
developer publication ; a little clicking gave me the
following constants enumeration :

enum {
   kUsersFolderType = 'usrs',
   kCurrentUserFolderType = 'cusr',
   kCurrentUserRemoteFolderLocation = 'rusf',
   kCurrentUserRemoteFolderType = 'rusr',
   kSharedUserDataFolderType = 'sdat',
   kVolumeSettingsFolderType = 'vsfd'
};

Which leads me to believe that in order to get the
current user's "Home" folder, you need to use :
  specialFolderPath("cusr")

Incidentally, you can retrieve the same infomation on
MacOSX and other Unix systems, by means of the $HOME
environment variable : see the topic "How to get the
location of the user's home directory"

The "Documents" folder inside the user's home folder
is only there for Windows switchers and to help the
user keep structure ; you could say that on MacOSX,
the home folder _is_ the documents folder.

That's wasn't too hard, was it ?

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


More information about the use-livecode mailing list