aspnet/FileSystem

EmbeddedFileProvider - Change _lastModified date to last write time of an assembly

martinba1 opened this issue · 2 comments

Could you please consider change of _lastModified date to last write time of an assembly? This information would be very useful if you want to use this file provider also for different purposes than Razor View.

File: FileSystem/src/Microsoft.Extensions.FileProviders.Embedded/EmbeddedFileProvider.cs
Current: _lastModified = DateTimeOffset.MaxValue;

My idea is:
if (assembly.Location != null)
_lastModified = new FileInfo(assembly.Location).LastWriteTime;
else
_lastModified = DateTimeOffset.MaxValue;

Thank you

Agreed.