2021-12-10 18:29:52 +00:00
|
|
|
// Minimal wrapper mimicking mkdirp package
|
2022-04-03 20:09:38 +00:00
|
|
|
const F = require('fs');
|
2021-12-10 18:29:52 +00:00
|
|
|
|
2022-04-03 20:09:38 +00:00
|
|
|
const M = (p, c) => { // async
|
|
|
|
F.mkdir(p, { recursive: true }, () => c()); // Never error
|
2021-12-10 18:29:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 20:09:38 +00:00
|
|
|
M.sync = (p) => { // sync
|
2021-12-10 18:29:52 +00:00
|
|
|
try {
|
2022-04-03 20:09:38 +00:00
|
|
|
F.mkdirSync(p, { recursive: true });
|
|
|
|
} catch { } // Never error
|
2021-12-10 18:29:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 20:09:38 +00:00
|
|
|
module.exports = M;
|