lastModified function

DateTime lastModified(
  1. String path
)

Returns the datetime the path was last modified

[path[ can be either a file or a directory.

Throws a DCliException with a nested FileSystemException if the file does not exist or the operation fails.

Implementation

DateTime lastModified(String path) {
  try {
    return File(path).lastModifiedSync();
  } on FileSystemException catch (e) {
    throw DCliException.from(e, Trace.current());
  }
}