appendFileAsString static method
追加文件内容
Implementation
static Future<bool> appendFileAsString(String filePath, String content, {bool catchException = true}) async {
try {
final file = File(filePath);
await file.writeAsString(content, mode: FileMode.append);
return true;
} catch (e) {
if (catchException) {
return false;
} else {
rethrow;
}
}
}