getFolder
Returns an object representing one of Netscape's standard directories.
Method of
Syntax
FileSpecObject getFolder ( String FolderName); FileSpecObject getFolder ( String folderName, String subDirectory); FileSpecObject getFolder ( Object localDirSpec, String subDirectory);Parameters
The getFolder method has the following parameters:
folderNameA 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. subDirectoryA 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). localDirSpecA FileSpecObjectrepresenting a directory obtained by getComponentFolder or getFolder.Returns
A
FileSpecObjectrepresenting one of Netscape's standard directories, orNULLin case of error or ifsubDirectoryrefers to a file that already exists.Description
The
getFoldermethod obtains an object representing one of Netscape's standard directories, for use with theaddFileandgetWinProfilemethods.The value of
folderNamemust be one of the following:
The "file:///" form is only valid when the
subDirectoryparameter 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.
Example
To get an object representing the standard plug-ins directory, you would use this call:
plugindir = getFolder("Plugins");
| Netscape Communications devedge.netscape.com |