nsIToolkitProfile 编辑
toolkit/profile/public/nsIToolkitProfile.idl
Scriptable 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 |
| 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 |
| 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论