19 lines
409 B
TypeScript
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 });
|
||
|
};
|