writeIfAbsent method
Never overwrites; creates only when missing.
Implementation
Future<void> writeIfAbsent(String relativePath, String contents) async {
final file = File(p.join(writer.root, relativePath));
if (await file.exists()) {
writer.skipped.add(relativePath);
preserved.add(relativePath);
return;
}
await writer.write(relativePath, contents, force: true);
}