Unpacks an entire directory into a temporary location.
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);
addDirectory method has the following parameters:
- The 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.
InstallVersionobject or a
Stringof up to four integer values delimited by periods, such as "1.17.1999.1517". For variants of this method without a version argument the value from
initInstallwill be used.
A 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.
An object representing a directory. The file is installed under this directory on the user's computer. You create this object by passing a string representing the directory to the
The name of a directory to append to
localDirSpec, using '/' as the path separator regardless of the platform.If
"", the filenames are appended directly to the folder name specified by
- An optional field; reserved for future use. Pass 0 as the default value.
An integer error code. For a list of possible values, see Return Codes. In some situations,
addDirectory may return other errors.
addDirectory method puts the files in the specified directory in a temporary location. To move the files and all other subcomponents to their final location, call the
performInstall method after you've successfully added all subcomponents. Also see the note about binaries on the Macintosh platform in addFile.