/** * Creates a new temp file, inside the '.temp' sub folder. * * @return {string} The full path of the new file. */ protected createTempFile(): string { const TEMP_DIR = this.getTempDir(); if (!fsExtra.existsSync(TEMP_DIR)) { fsExtra.mkdirsSync(TEMP_DIR); } const TEMP_FILE = tmp.tmpNameSync({ dir: TEMP_DIR, }); fsExtra.writeFileSync( TEMP_FILE, Buffer.alloc(0) ); return TEMP_FILE; }
var bootstrapFileName = tmp.tmpNameSync({});
this.creatingPublicationsOPDS = false; this.opdsJsonFilePath = tmpNameSync({ prefix: "readium2-OPDS2-", postfix: ".json" });
let name = tmp.tmpNameSync({template: '/tmp/guanyu-XXXXXXXX'}); logger.debug(`Fetching "${payload.resource}" to "${name}"`);
const unencryptedPath = tmp.tmpNameSync() fs.writeFileSync(unencryptedPath, 'some-unencrypted-data') IV const encryptedPath = tmp.tmpNameSync() let writeStream = fs.createWriteStream(encryptedPath) encryptedStream.pipe(writeStream) IV const decryptedPath = tmp.tmpNameSync() writeStream = fs.createWriteStream(decryptedPath) decryptedStream.pipe(writeStream)
var bootstrapFileName = tmp.tmpNameSync({});