addDirectory
Unpacks an entire directory into a temporary location.
Method of
InstallSyntax
public int addDirectory ( String xpiSourcePath); public int addDirectory ( String registryName, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); public int addDirectory ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath); public int addDirectory ( String registryName, String version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate); public int addDirectory ( String registryName, InstallVersion version, String xpiSourcePath, Object localDirSpec, String relativeLocalPath, Boolean forceUpdate);Parameters
The
addDirectorymethod has the following parameters:
registryNameThe pathname in the Client Version Registry for the root directory of the files that are to be installed. This parameter can be an absolute pathname (beginning with a /) or a relative pathname, (not beginning with a slash). An absolute pathname is used as specified. A relative pathname is appended to the registry name of the package as specified by the package parameter to the initInstall method. This parameter can also be null, in which case the xpiSourcePath parameter is used as a relative pathname. Note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the Client Version Registry. versionAn InstallVersionobject or aStringof up to four integer values delimited by periods, such as "1.17.1999.1517". For variants or this method without a version argument the value frominitInstallwill be used.xpiSourcePathA string specifying the location of the directory within the XPI file. An empty string ("") causes the creation of a subdirectory node in the registry without actually unpacking any files, which may be useful when you are updating a package that contains subcomponents that could also be updated separately. When xpiSourcePathis an empty string,registryNamecannot be null.localDirSpecAn object representing a directory. The directory is installed under this directory on the user's computer. You create this object by passing a string representing the directory to the getFoldermethod.subdirThe name of a directory to append to localDirSpec, using `/' as the path separator regardless of the platform. Ifsubdiris missing,null, or"", the filenames are appended directly to the folder name specified bylocalDirSpec.flagsAn optional field; reserved for future use. Pass 0 as the default value. Returns
An integer error code. For a list of possible values, see Return Codes. In some situations,
addDirectorymay return other errors.Description
The
addDirectorymethod puts the files in the specified directory in a temporary location. To move the files and all other subcomponents to their final location, call theperformInstallmethod after you've successfully added all subcomponents.Also see the note about binaries on the Macintosh platform in addFile.
| Netscape Communications devedge.netscape.com |