getModified static method

DateTime? getModified(
  1. File file
)

Implementation

static DateTime? getModified(File file) {
  if (which('git').notfound) {
    return null;
  }
  if (!isGitDir()) {
    return null;
  }

  try {
    return _parseOutput('git log --follow --format=%aI -1 -- ${file.path}'
        .toList().join('\n'));
  } catch (e) {
    return null;
  }
}