Files
pilipala/lib/utils/utils.dart
2023-04-18 11:28:59 +08:00

17 lines
420 B
Dart

// 工具函数
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;
}
}