Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

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

Closed
martinba1 opened this issue Jun 29, 2016 · 2 comments
Assignees

Comments

@martinba1
Copy link

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

@martinba1 martinba1 changed the title EmbeddedFileProvider - Change _lastModified date to last write of an assembly EmbeddedFileProvider - Change _lastModified date to last write time of an assembly Jun 29, 2016
@muratg
Copy link

muratg commented Jun 29, 2016

Agreed.

@BrennanConroy
Copy link
Member

a5366af

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants