Interface representing a location where extensions, themes etc are installed.
[scriptable, uuid(d3d4dada-c6eb-11d9-a68f-001124787b2e)]
interface nsIInstallLocation : nsISupports
Constants
Constants representing priority of some default Install Locations.
XXXben - priority ranking of user-level items vs. global-level items
here is debatable. Should app-system-global trump
xre-system-user?
You should not use the exact values here, you should offset from
these values each time you create a new Install Location. Offsetting
can be brittle but you should know what Install Locations are being
defined for your own application.
const
unsigned long
PRIORITY_APP_PROFILE = 0
const
unsigned long
PRIORITY_APP_SYSTEM_USER = 10
const
unsigned long
PRIORITY_XRE_SYSTEM_USER = 100
const
unsigned long
PRIORITY_APP_SYSTEM_GLOBAL = 1000
const
unsigned long
PRIORITY_XRE_SYSTEM_GLOBAL = 10000
Attributes
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 attribute
boolean
canAccess
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 attribute
nsIDirectoryEnumerator
itemLocations
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 attribute
nsIFile
location
The string identifier of this Install Location
readonly attribute
AString
name
The priority level of this Install Location in loading.
readonly attribute
long
priority
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.
readonly attribute
boolean
restricted
Methods
Retrieves the GUID for an item at the specified location.
@param file
The location where an item might live.
@returns The ID for an item that might live at the location specified.
N.B. This function makes no promises about whether or not this path is
actually maintained by this Install Location.
AString
getIDForLocation(in nsIFile file)
Gets a nsIFile object for a file within an item's directory structure.
@param id
The GUID of the item.
@param path
The path to the file beneath an Extension's directory
@returns A file object at the requested location. The file does not
necessarily have to exist.
nsIFile
getItemFile(in AString id, in AString path)
Gets the directory that contains an item.
@param id
The GUID of the item.
@returns The location of the item.
nsIFile
getItemLocation(in 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.
@param id
The GUID of the item.
@returns true if the item's resources are managed independently of the
Extension System, false otherwise.
boolean
itemIsManagedIndependently(in AString id)
Compare to: