ente/src/api/common.ts
2022-08-25 11:36:19 +05:30

10 lines
297 B
TypeScript

import { ipcRenderer } from 'electron/renderer';
import { logError } from '../utils/logging';
export const selectRootDirectory = async () => {
try {
return await ipcRenderer.invoke('select-dir');
} catch (e) {
logError(e, 'error while selecting root directory');
}
};