打开用户的主文件夹?

发布于 2024-08-21 03:21:59 字数 191 浏览 2 评论 0原文

我的 XULRunner 应用程序有一个名为“Show Recordings”的按钮。按下它应该会导致 Windows 资源管理器为用户打开该文件夹。我怎样才能实现这个目标?

我在文件 I/O 文档中找不到它,也许我找错了地方。

编辑 问题不是找到路径,而是告诉系统打开文件夹。我似乎找不到“openFolder”功能。

My XULRunner application has a button named "Show Recordings". Pressing it should result in Windows Explorer opening the folder for the user. How can I achieve this?

I can't find it in the File I/O documentation, perhaps I'm looking in the wrong place.

Edit
The problem is not finding the path, but telling the system to open the folder. I can't seem to find a "openFolder" function.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把人绕傻吧 2024-08-28 03:21:59

您正在 nsILocalFile 上查找 reveal() 方法。

You're looking for the reveal() method on nsILocalFile.

趁年轻赶紧闹 2024-08-28 03:21:59

您的意思是:

  %HOMEPATH%

我的意思是,如果您想要一个全局变量来获取当前用户的主目录路径,请使用%HOMEPATH%。我想你必须将该按钮设置为这个值。有关 Windows 环境变量的列表,请从 wiki 文章开始。

Do you mean:

  %HOMEPATH%

And by that I mean, if you want a global variable to get the current user's home directory path, use %HOMEPATH%. I guess you have to set that button to this value. For a list of Windows environment variables, start at the wiki article.

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