1 /* global __LOCATION__ */
4 var testDir = __LOCATION__.parent;
5 // create a test file, then symlink it, then check that we think it's a symlink
6 var targetFile = testDir.clone();
7 targetFile.append("target.txt");
8 if (!targetFile.exists()) {
9 targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
12 var link = testDir.clone();
18 var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
19 ln.initWithPath("/bin/ln");
20 var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
22 var args = ["-s", targetFile.path, link.path];
23 process.run(true, args, args.length);
24 Assert.ok(link.isSymlink());