The [getStandardFolder] command.

Description

The getStandardFolder command returns the full path of certain system-related directories. Optionnally this function can create (or attempt to create, depending on the permissions) the folders when they do not exist already.

Synopsis

The syntax of the command is:
    getStandardFolder ?-create? name ?domain?
The arguments have the following signification:

The directory returned by this command may not exist. This method simply gives the appropriate location for the requested directory. Furthermore, this command will not necessarily succeed and return a folder path, depending on the requested domain. If no folder path is found, the command raises an error.

Symbolic folder names

One must specify the type of folder using a symbolic name. The table below indicates the currently defined names.
AdminApplication
AllApplications
AllLibraries
Application
ApplicationSupport
AutosavedInformation
Caches
CoreService
DemoApplication
Desktop
Developer
DeveloperApplication
Document
Documentation
Downloads
InputMethods
ItemReplacement
Library
Movies
Music
Pictures
PreferencePanes
PrinterDescription
SharedPublic
User

Examples

Here are some examples to demonstrate the use of the [getStandardFolder] command.
To get the user's Applications folder:
    getStandardFolder AllApplications user

To get the local Applications folder:
    getStandardFolder AllApplications local

To get the local Demos folder:
    getStandardFolder DemoApplication local

To get the user's Demos folder and create it if does not exist:
    getStandardFolder -create DemoApplication user

To get the system Users folder:
    getStandardFolder User system


Last updated 2016-11-23 15:54:16