fileMatchesTrackedState method
Implementation
Future<bool> fileMatchesTrackedState(String path) async {
final tracked = trackedFile(path);
if (tracked == null) {
return false;
}
final file = File(path);
if (!await file.exists()) {
return false;
}
final stat = await file.stat();
if (stat.modified != tracked.lastModified || stat.size != tracked.size) {
return false;
}
final content = await file.readAsString();
return content == tracked.content;
}