feat: unp4kc use TemporaryDirectory

This commit is contained in:
2024-04-27 14:40:01 +08:00
parent b5cde95661
commit 9bdccc3bbf
2 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:hive/hive.dart';
import 'package:starcitizen_doctor/common/conf/const_conf.dart';
import 'package:starcitizen_doctor/common/utils/log.dart';
class SCLoggerHelper {
@ -115,6 +116,15 @@ class SCLoggerHelper {
return scInstallPaths;
}
static String getGameChannelID(String installPath) {
for (var value in ConstConf.gameChannels) {
if (installPath.endsWith("\\$value")) {
return value;
}
}
return "UNKNOWN";
}
static Future<List<String>?> getGameRunningLogs(String gameDir) async {
final logFile = File("$gameDir/Game.log");
if (!await logFile.exists()) {