feat: use expressions.
This commit is contained in:
+8
-2
@@ -52,6 +52,12 @@ void walkPath(FileSystemEntity path) {
|
|||||||
// 默认代码块开始
|
// 默认代码块开始
|
||||||
if (tmp.isNotEmpty) {
|
if (tmp.isNotEmpty) {
|
||||||
sb.write(tmp);
|
sb.write(tmp);
|
||||||
|
print([
|
||||||
|
"${file!.path} modified",
|
||||||
|
"-" * 80,
|
||||||
|
tmp.toString(),
|
||||||
|
"-" * 80,
|
||||||
|
].join("\n"));
|
||||||
state = STATE.replace;
|
state = STATE.replace;
|
||||||
} else {
|
} else {
|
||||||
state = STATE.none;
|
state = STATE.none;
|
||||||
@@ -82,8 +88,8 @@ void walkPath(FileSystemEntity path) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (modified) {
|
if (modified) {
|
||||||
// file!.renameSync(path.path + '.bak');
|
file!.renameSync(path.path + '.bak');
|
||||||
// File(path.path).writeAsStringSync(sb.toString(), flush: true);
|
File(path.path).writeAsStringSync(sb.toString(), flush: true);
|
||||||
print(sb.toString());
|
print(sb.toString());
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user