Exemplo n.º 1
0
 create(text) {
     let tempFile = temp.openSync({suffix: '.py'});
     fs.writeSync(tempFile.fd, text);
     fs.closeSync(tempFile.fd);
     return new TempFileWrapper(tempFile);
 }
Exemplo n.º 2
0
function testOpenSync() {
    const f1: temp.OpenFile = temp.openSync({ dir: "tempDir", prefix: "pref", suffix: "suff" });
    const f2: temp.OpenFile = temp.openSync("str");
}
Exemplo n.º 3
0
function testOpenSync() {
    const { fd: openFd1, path: openPath1 } = temp.openSync({ dir: "tempDir", prefix: "pref", suffix: "suff" });
    const { fd: openFd2, path: openPath2 } = temp.openSync("str");
}