nsIToolkitProfile 编辑

toolkit/profile/public/nsIToolkitProfile.idlScriptable 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

AttributeTypeDescription
localDirnsILocalFileThe location of the profile local directory, which may be the same as the root directory. See nsIProfileLock.localDirectory(). Read only.
nameAUTF8StringThe profile's name.
rootDirnsILocalFileThe 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:97 次

字数:4632

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文