Set Creation, LastAccess and LastWrite time for files #872
Labels
area: testinghelpers
Issues that address the testing helpers
state: ready to pick
Issues that are ready for being worked on
type: enhancement
Issues that propose new functionality
Is your feature request related to a problem? Please describe.
I want to test a functionality that relies on the "GetLastWriteTimeUtc" method to detect when a file was last changed.
This property in
MockFileSystem
only returns a fixed value "2010-02-03 20:00:00"Describe the solution you'd like
MockFileSystem
should set the creation, last access and last write times and return the correct values.Ideally you would also provide an optional callback or property to set, so that I can even mock the time that is stored.
Describe alternatives you've considered
None, as the times are not even tracked anywhere internally.
Additional context
I would like e.g. the following unit test to pass:
The text was updated successfully, but these errors were encountered: