2
如何打開XUL的網絡文件夾?我的Firefox工具欄,它可以訪問驅動器像C:
,而不是像網絡路徑//Development
...與代碼:file.initWithPath("\\DEVELOPMENT2");
如何使用XUL打開網絡文件夾
全碼:
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("\\\DEVELOPMENT2"); //---> this is not working
//file.initWithPath("Y:"); ---> this is working
file.reveal();
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
process.init(file);
var args = [];
process.run(false, args, args.length);
//end
非常感謝你,這正是我想要的,乾杯! –