Backed out changeset 627d872075bc (bug 1305230)

This commit is contained in:
Sebastian Hengst 2017-10-17 17:04:15 +02:00
Родитель 38e1b71b49
Коммит 2f49a0c0b7
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -1,15 +1,14 @@
var { classes: Cc, interfaces: Ci, utils: Cu } = Components; var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.importGlobalProperties(["File"]); Cu.importGlobalProperties(["File"]);
var fileNum = 1;
function createFileWithData(fileData) { function createFileWithData(fileData) {
var willDelete = fileData === null; var willDelete = fileData === null;
var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties); var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
var testFile = dirSvc.get("ProfD", Ci.nsIFile); var testFile = dirSvc.get("ProfD", Ci.nsIFile);
testFile.append("fileAPItestfile"); testFile.append("fileAPItestfile" + fileNum);
testFile.createUnique(Components.interfaces.nsIFile.FILE_TYPE, 0o600); fileNum++;
var outStream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); var outStream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate outStream.init(testFile, 0x02 | 0x08 | 0x20, // write, create, truncate
0o666, 0); 0o666, 0);