Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// touch API tests
touch(strVal, (e) => console.log(e));
touch(strVal, opts, (e) => console.log(e));
touch.sync(strVal);
touch.sync(strVal, opts);
// ftouch API tests
touch.ftouch(numVal, (e) => console.log(e));
touch.ftouch(numVal, opts, (e) => console.log(e));
touch.ftouch.sync(numVal);
touch.ftouch.sync(numVal, opts);
touch.ftouchSync(numVal);
touch.ftouchSync(numVal, opts);
// touch API tests
touch(strVal, (e) => console.log(e));
touch(strVal, opts, (e) => console.log(e));
touch.sync(strVal);
touch.sync(strVal, opts);
// ftouch API tests
touch.ftouch(numVal, (e) => console.log(e));
touch.ftouch(numVal, opts, (e) => console.log(e));
touch.ftouch.sync(numVal);
touch.ftouch.sync(numVal, opts);
touch.ftouchSync(numVal);
touch.ftouchSync(numVal, opts);
writeStream.on('finish', function () {
if (response.headers['last-modified'])
touch.ftouchSync(fd, { 'mtime': new Date(response.headers['last-modified']) });
writeStream.close();
fs.rename(tmpDir + '/' + fileUrl + '.download', tmpDir + '/' + fileUrl, function (err) {
if (!err) {
queue[fileUrl].finished = true;
queue[fileUrl].error = null;
queue[fileUrl].errorCount = 0;
cb(self);
} else {
queue[fileUrl].error = err;
queue[fileUrl].errorCount++;
cb(self);
}
});
});
}, function (err) {