You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
262 B
11 lines
262 B
|
2 months ago
|
import fs from "fs";
|
||
|
|
export async function isWriteable(directory) {
|
||
|
|
try {
|
||
|
|
await fs.promises.access(directory, (fs.constants || fs).W_OK);
|
||
|
|
return true;
|
||
|
|
} catch (err) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//# sourceMappingURL=is-writeable.js.map
|