cvpilot-tool/apps/desktop/electron/core/initial.ts
2024-10-13 10:10:05 +08:00

19 lines
409 B
TypeScript

import { app } from "electron";
import { mkdirSync } from "fs";
import path from "path";
const root = app.getPath("userData");
/**
* 插件目录
*/
export const pluginPath = path.join(root, "plugin");
/**
* 模型目录
*/
export const modelPath = path.join(root, "model");
export const initialize = () => {
mkdirSync(pluginPath, { recursive: true });
mkdirSync(modelPath, { recursive: true });
};