nsIToolkitProfile

Represents a user profile.
Inherits from: nsISupports Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

You should not create these objects yourself; to obtain them, use the nsIToolkitProfileService interface to create and obtain them.

 

Method overview

nsIProfileLock lock(out nsIProfileUnlocker aUnlocker);
void remove(in boolean removeFiles);

Attributes

Attribute Type Description
localDir nsILocalFile The location of the profile local directory, which may be the same as the root directory. See nsIProfileLock.localDirectory(). Read only.
name AUTF8String The profile's name.
rootDir nsILocalFile The location of the profile directory. Read only.

Methods

lock()

Locks the profile using platform-specific locking methods.

nsIProfileLock lock(
  out nsIProfileUnlocker aUnlocker
);
Parameters
aUnlocker
On error, contains an nsIProfileUnlocker object you can use to unlock the profile.
Note: The unlocker object cannot be returned to JavaScript as the error causes an exception to be thrown. The unlocker object is only available in Gecko 34 or later when running on Windows Vista or later.
Return value

An nsIProfileLock object which holds a profile lock as long as you hold a reference to it.

Example:

var profile = profileList.getNext().QueryInterface(Ci.nsIToolkitProfile);
var locker = profile.lock({});

remove()

Removes the profile from the registry of profiles.

void remove(
  in boolean removeFiles
);
Parameters
removeFiles
Indicates whether or not the profile directory should be removed when the profile is removed from the profile list.

See also

Document Tags and Contributors

 Contributors to this page: Neil, Sheppy, Noitidart
 Last updated by: Neil,