LookAtMySuitBot/js/node_modules/minecraft-folder-path/index.js

31 lines
610 B
JavaScript
Raw Normal View History

2023-12-24 20:08:39 -05:00
const path = require("path");
const os = require("os");
let folder = "";
switch (os.type()) {
case "Darwin":
folder = path.join(
os.homedir(),
"/Library",
"Application Support",
"minecraft"
);
break;
case "win32":
case "Windows_NT":
folder = path.join(
process.env.APPDATA ||
path.join(os.homedir(), "AppData", "Roaming"),
".minecraft"
);
break;
default:
folder = path.join(os.homedir(), ".minecraft");
break;
}
module.exports = folder;