nsIInstallLocation
| IID: | 32a74707-ec7c-af19-f4d8-d0cd8cb6a948 |
| Inherits From: | nsISupports |
Interface representing a location where extensions, themes etc are installed.
Constants
Properties
readonly PRBool canAccess
Whether or not the user can write to the Install Location with the current access privileges. This is different from restricted because it's not whether or not the location *might* be restricted, it's whether or not it actually *is* restricted right now.
readonly nsIDirectoryEnumerator itemLocations
An enumeration of nsIFiles for: - locations that contain items - potential dropped-in XPIs Note: This enumeration resolves Text Links to the directories they refer to.
readonly nsIFile location
The file system location where items live. Items can be dropped in at this location. Can be null for Install Locations that don't have a file system presence. Note: This is a clone of the actual location which the caller can modify freely.
readonly AString name
The string identifier of this Install Location
readonly PRInt32 priority
The priority level of this Install Location in loading.
readonly PRBool restricted
Whether or not this Install Location is on an area of the file system that could be restricted on a restricted-access account, regardless of whether or not the location is restricted with the current user privileges.
Methods
AString getIDForLocation ( nsIFile file )
nsIFile getItemFile ( AString id , AString path )
nsIFile getItemLocation ( AString id )
nsIFile getStageFile ( AString id )
PRBool itemIsManagedIndependently ( AString id )
void removeFile ( nsIFile file )
nsIFile stageFile ( nsIFile file , AString id )
AString getIDForLocation ( nsIFile file )
Retrieves the GUID for an item at the specified location.
N.B. This function makes no promises about whether or not this path is actually maintained by this Install Location.
- Arguments:
- file: The location where an item might live.
nsIFile getItemFile ( AString id , AString path )
Gets a nsIFile object for a file within an item's directory structure.
- Arguments:
- id: The GUID of the item.
- path: The path to the file beneath an Extension's directory
nsIFile getItemLocation ( AString id )
Gets the directory that contains an item.
- Arguments:
- id: The GUID of the item.
nsIFile getStageFile ( AString id )
Returns the most recently staged package (e.g. the last XPI or JAR in a directory) for an item and removes items that do not qualify.
- Arguments:
- id: The ID of the staged package
PRBool itemIsManagedIndependently ( AString id )
Determines whether or not an item's resources are managed by the Extension System or by some other user or process. For example, items linked to by text links are managed by the user, and items linked to from Registry Install Locations are usually managed by other applications or installers.
- Arguments:
- id: The GUID of the item.
void removeFile ( nsIFile file )
Removes a file from the stage. This cleans up the stage if there is nothing else left after the remove operation.
- Arguments:
- file: The file to remove.
nsIFile stageFile ( nsIFile file , AString id )
Stages the specified file by copying it to some location from where it can be retrieved later to complete installation.
- Arguments:
- file: The file to stage
- id: The GUID of the item the file represents
References
This interface is returned from the following methods:
nsIExtensionManager.getInstallLocation
Reference documentation is generated from Mozilla's source.
