Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Symbolic Link

已查看 23 次
跳至第一个未读帖子

isnw

未读,
2009年10月7日 23:03:232009/10/7
收件人
Is it possible to create a symbolic link through a Firefox extension?
We can create files and folders but I haven't found a method for
creating symlinks in MDC yet.

Pavol Mišík

未读,
2009年10月8日 00:51:402009/10/8
收件人
I think you can create native component that will offer this
functionality to your extension. But you have to do this for every
supported platform and of course you have to check if file system
support this feature.

PM-

isnw

未读,
2009年10月8日 20:52:582009/10/8
收件人
That makes sense. Thanks for the feedback.

slotboxed

未读,
2009年10月15日 06:21:152009/10/15
收件人

you can do it through a shell script

--------------------------------

var shell = "/bin/sh";

var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);

file.initWithPath(shell);


var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);

process.init(file);

-------------------

found at http://forums.mozillazine.org/viewtopic.php?f=19&t=663377

slotboxed

未读,
2009年10月15日 06:49:222009/10/15
收件人

oops, missed the last two lines of code:

var args = ["path/to/script","arg1","arg2","etc"];

process.run(false, args, args.length);

0 个新帖子