Lines Matching refs:pth
13 const checkPath = pth => { argument
15 const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''));
18 const err = new Error(`Path contains invalid characters: ${pth}`);
32 const make = pth => { argument
33 return mkdir(pth, opts.mode)
34 .then(() => pth)
37 if (err.message.includes('null bytes') || path.dirname(pth) === pth) {
41 return make(path.dirname(pth)).then(() => make(pth));
44 return stat(pth)
45 .then(stats => stats.isDirectory() ? pth : Promise.reject())
59 const make = pth => {
61 opts.fs.mkdirSync(pth, opts.mode);
64 if (err.message.includes('null bytes') || path.dirname(pth) === pth) {
68 make(path.dirname(pth));
69 return make(pth);
73 if (!opts.fs.statSync(pth).isDirectory()) {
81 return pth;