add optional logging, cleanup fixes

This commit is contained in:
2024-04-15 13:07:40 +02:00
parent 8b30b7c1fa
commit 638f1e852e
9 changed files with 487 additions and 271 deletions

15
electron/fileUtil.js Normal file
View File

@@ -0,0 +1,15 @@
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,
};