You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
330 B
JavaScript
20 lines
330 B
JavaScript
'use strict';
|
|
module.exports = function (pth, cb) {
|
|
if (String(pth).indexOf('\u0000') !== -1) {
|
|
var err = new Error('Path must be a string without null bytes.');
|
|
err.code = 'ENOENT';
|
|
|
|
if (typeof cb !== 'function') {
|
|
throw err;
|
|
}
|
|
|
|
process.nextTick(function () {
|
|
cb(err);
|
|
});
|
|
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|