Add mod jail functions

This commit is contained in:
zontreck 2023-11-04 16:56:18 -07:00
parent 8162dbe97a
commit 4fb06c8462

View file

@ -72,6 +72,10 @@ class Settings {
return "$game_path${Platform.pathSeparator}mods"; return "$game_path${Platform.pathSeparator}mods";
} }
String getModJailPath() {
return "$game_path${Platform.pathSeparator}mods.jail";
}
Future<void> createModFolderIfNotExists() async { Future<void> createModFolderIfNotExists() async {
if (Directory(getModPath()).existsSync()) { if (Directory(getModPath()).existsSync()) {
return; return;
@ -80,6 +84,14 @@ class Settings {
} }
} }
Future<void> createModJailFolderIfNotExists() async {
if (Directory(getModJailPath()).existsSync()) {
return;
} else {
await Directory(getModJailPath()).create(recursive: true);
}
}
bool serverInstalled() { bool serverInstalled() {
return File( return File(
"${getServerPath()}${Platform.pathSeparator}ConanSandboxServer.exe") "${getServerPath()}${Platform.pathSeparator}ConanSandboxServer.exe")