mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding translation for button
This commit is contained in:
parent
cbbe6993bd
commit
a121ef77c0
21 changed files with 176 additions and 62 deletions
15
src/main/events/hardware/check-folder-write-permission.ts
Normal file
15
src/main/events/hardware/check-folder-write-permission.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import fs from "node:fs";
|
||||
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
const checkFolderWritePermission = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
path: string
|
||||
) =>
|
||||
new Promise((resolve) => {
|
||||
fs.access(path, fs.constants.W_OK, (err) => {
|
||||
resolve(!err);
|
||||
});
|
||||
});
|
||||
|
||||
registerEvent("checkFolderWritePermission", checkFolderWritePermission);
|
Loading…
Add table
Add a link
Reference in a new issue