feat: use expressions.

master
DebuggerX 4 years ago
parent abc354f1c6
commit 87e9eafe73

@ -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) {

Loading…
Cancel
Save