isaacscript
Version:
A command line tool for managing Isaac mods written in TypeScript.
16 lines • 703 B
JavaScript
import { isDirectory, isFile, makeDirectory, touch } from "complete-node";
import path from "node:path";
import { WATCHER_MOD_NAME } from "../../constants.js";
export function touchWatcherSaveDatFiles(config) {
const modsDataPath = path.resolve(config.modsDirectory, "..", "data");
const watcherModDataPath = path.join(modsDataPath, WATCHER_MOD_NAME);
if (!isDirectory(watcherModDataPath)) {
makeDirectory(watcherModDataPath);
}
const saveDatFileName = `save${config.saveSlot}.dat`;
const saveDatPath = path.join(watcherModDataPath, saveDatFileName);
if (!isFile(saveDatPath)) {
touch(saveDatPath);
}
}
//# sourceMappingURL=touchWatcherSaveDatFiles.js.map