http 初始化
This commit is contained in:
16
lib/utils/utils.dart
Normal file
16
lib/utils/utils.dart
Normal file
@ -0,0 +1,16 @@
|
||||
// 工具函数
|
||||
import 'dart:io';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class Utils {
|
||||
static Future<String> getCookiePath() async {
|
||||
Directory tempDir = await getApplicationSupportDirectory();
|
||||
String tempPath = "${tempDir.path}/.plpl/";
|
||||
Directory dir = Directory(tempPath);
|
||||
bool b = await dir.exists();
|
||||
if (!b) {
|
||||
dir.createSync(recursive: true);
|
||||
}
|
||||
return tempPath;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user