path 수정
This commit is contained in:
parent
3b7230d1a4
commit
962861b74e
2 changed files with 7 additions and 8 deletions
|
|
@ -19,11 +19,11 @@ class Path {
|
|||
static Future<String> get dataPath async {
|
||||
String path = await userPath;
|
||||
if (Platform.isMacOS) {
|
||||
path = '$path/Library/${await projectName}';
|
||||
path = '$path/Library/$appIdendifier';
|
||||
} else if (Platform.isLinux) {
|
||||
path = '$path/.config/${await projectName}';
|
||||
path = '$path/.config/$appIdendifier';
|
||||
} else if (Platform.isWindows) {
|
||||
path = '$path/AppData/Local/${await projectName}';
|
||||
path = '$path/AppData/Local/$appIdendifier';
|
||||
}
|
||||
return dataFutrue(path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,20 +13,19 @@ const int intMin = -0x8000000000000000;
|
|||
bool isDebug = true;
|
||||
String userPath = '';
|
||||
String dataPath = '';
|
||||
String projectName = '';
|
||||
String scriptPath = '';
|
||||
String executablePath = '';
|
||||
String appIdendifier = '';
|
||||
String appName = '';
|
||||
|
||||
Future initialize(String name, String appID) async {
|
||||
appIdendifier = appID;
|
||||
appName = name;
|
||||
scriptPath = Platform.script.toFilePath(windows: Platform.isWindows);
|
||||
executablePath = Platform.executable;
|
||||
isDebug = path.basename(Platform.resolvedExecutable) == 'dart';
|
||||
userPath = await Path.userPath;
|
||||
dataPath = await Path.dataPath;
|
||||
scriptPath = Platform.script.toFilePath(windows: Platform.isWindows);
|
||||
executablePath = Platform.executable;
|
||||
appIdendifier = appID;
|
||||
appName = name;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue