statSync method
Synchronously calls the operating system's stat()
function on path.
Identical to FileStat.statSync(this.path)
.
Returns a FileStat object containing the data returned by stat()
.
If path is a symbolic link then it is resolved and results for the resulting file are returned.
If the call fails, returns a FileStat object with .type
set to
FileSystemEntityType.notFound and the other fields invalid.
Implementation
@override
FileStat statSync() {
final Map<String, dynamic> map = json.decode(window.localStorage[_statKey]!);
return FileStat._(
DateTime.parse(map['accessed']),
DateTime.parse(map['changed']),
map['mode'],
DateTime.parse(map['modified']),
_size,
this is Directory ? FileSystemEntityType.directory : FileSystemEntityType.file,
);
}