blob: 5e3b4936ac3ae9cc77bb49337d7a323e147ccfd9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.importGlobalProperties(["File"]);
var testFile = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIDirectoryService)
.QueryInterface(Ci.nsIProperties)
.get("ProfD", Ci.nsIFile);
testFile.append("prefs.js");
addMessageListener("file.open", function () {
sendAsyncMessage("file.opened", {
file: File.createFromNsIFile(testFile),
mtime: testFile.lastModifiedTime,
fileWithDate: File.createFromNsIFile(testFile, { lastModified: 123 }),
fileDate: 123,
});
});
|