mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Cache the last modified date in NativeFileStreamFactory
This commit is contained in:
@ -34,7 +34,16 @@ namespace Wabbajack.Common
|
|||||||
return await _file.OpenRead();
|
return await _file.OpenRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTime LastModifiedUtc => _file.LastModifiedUtc;
|
private DateTime? _lastModifiedCache = null;
|
||||||
|
public DateTime LastModifiedUtc
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
_lastModifiedCache ??= _file.LastModifiedUtc;
|
||||||
|
return _lastModifiedCache.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public IPath Name { get; }
|
public IPath Name { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user