Returns an object representing one of the standard directories.
FileSpecObject getFolder ( String FolderName); FileSpecObject getFolder ( String folderName, String subDirectory); FileSpecObject getFolder ( Object localDirSpec, String subDirectory);
The getFolder method has the following parameters:
- A string representing one of Netscape's standard directories. There are two sets of possible values for this parameter. The first set contains platform-independent locations; the second set contains platform-specific locations. You are encouraged to use the platform-independent locations. See the list in the Description section for the two sets of locations.
- A string that specifies the name of a subdirectory. If the specified subdirectory doesn't exist, it is created. This parameter is available in Netscape 6 or later and may be case sensitive (depending on the operating system).
FileSpecObjectrepresenting a directory obtained by getComponentFolder or getFolder.
FileSpecObject representing one of Netscape's standard directories, or
NULL in case of error or if
subDirectory refers to a file that already exists.
getFolder method obtains an object representing one of Netscape's standard directories, for use with the
The value of
folderName must be one of the following (info is based on Mozilla 1.7 stable branch, might also work in other versions):
The "file:///" form is only valid when the
subDirectory parameter is used. It must be in file: URL format minus the "file:///" part. For example,
mydir = getFolder("file:///", "c|/mysoftco/somedir");
Note that forward slashes are used, regardless of the platform.
The folders whose names start with "Win", "Mac", or "Unix" are specific to those platforms. You should be careful about using one of those directories, as it makes your installation platform-specific.
To get an object representing the standard plug-ins directory, you would use this call:
plugindir = getFolder("Plugins");