mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-16 08:26:56 +08:00
15 lines
347 B
TypeScript
15 lines
347 B
TypeScript
import path from "path";
|
|
import fs from "fs";
|
|
|
|
export default (): string => {
|
|
let localDataFile: any = process.env.HOME;
|
|
if (!localDataFile) {
|
|
localDataFile = process.env.LOCALAPPDATA;
|
|
}
|
|
const rubickPath = path.join(localDataFile, "rubick")
|
|
if (!fs.existsSync(rubickPath)) {
|
|
fs.mkdirSync(rubickPath);
|
|
}
|
|
return rubickPath;
|
|
};
|