blob: 6befbeb3f9f4242a9d9254a84e172fa25a8eb2ca [file] [log] [blame]
'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;
}