EZPPLauncher/electron/fileUtil.js

16 lines
239 B
JavaScript
Raw Normal View History

2024-04-15 11:07:40 +00:00
const fs = require("fs");
function isWritable(filePath) {
let fileAccess = false;
try {
fs.closeSync(fs.openSync(filePath, "r+"));
fileAccess = true;
} catch {
}
return fileAccess;
}
module.exports = {
isWritable,
};