setLastModifiedSync method

  1. @override
void setLastModifiedSync(
  1. DateTime time
)
override

Synchronously modifies the time the file was last modified.

If the attributes cannot be set, throws a FileSystemException.

Implementation

@override
void setLastModifiedSync(DateTime time) {
  final file = assertIsFile<MemoryFileImplementation>(
    _fs,
    path,
    'Failed to set file modification time',
  );

  file.lastModified = time;
}