Uh oh!
There was an error while loading. Please reload this page.
feat: set Creation, LastAccess and LastWrite time for files - #875
Conversation
7ecbd63 to
30df259ComparePlease note, that I changed the Interface I am not sure what I should do: |
vbreuss
commented
Aug 17, 2022
If this is an accepted approach, I could also try to have a look at #839, which deals with the times of directories. This would probably be quite similar... |
fgreinacher
commented
Aug 17, 2022
Sorry @vbreuss, I'm a bit busy with other things, will try to have a look by the end of this week! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Also apply time in MockFileStream Mark MockFile_AfterSetAccessControl_ShouldUpdateLastAccessTime as Windows-Only Fix name of unit tests to match the actual expected behavior
510c290 to
99ebdabCompare…ind` in the various methods/properties.
…ess-and-last-write-times
vbreuss
commented
Aug 31, 2022
@siprbaum : I merged the latest changes, so that this branch is up to date. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vbreuss
commented
Sep 2, 2022
@siprbaum : Thanks for the review! Regarding the user detectable behaviour change: |
Uh oh!
There was an error while loading. Please reload this page.
vbreuss
commented
Sep 10, 2022
@fgreinacher : I merged the latest |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Florian Greinacher <florian@greinacher.de>
Co-authored-by: Florian Greinacher <florian@greinacher.de>
This is addressed in release v17.2.3. |
This is addressed in release v17.2.3. |
Implements #872
Adjust
CreationTime,LastAccessTimeandLastWriteTimewhen interacting with files in theMockFileSystem.Provides a means to mock the used DateTime by calling e.g.
Implementes the following logic in MockFile:
All these cases are covered by unit tests in MockFileAdjustTimesTest
CreationTime, LastAccessTime and LastWriteTime are set to the current time
WriteAllText,WriteAllBytes,AppendAllText,OpenWrite,Open)LastAccessTime and LastWriteTime are set to the current time
CreationTime is left unchanged
ReadAllText,ReadAllLines,ReadAllBytes,OpenRead)LastAccessTime is set to the current time
CreationTime and LastWriteTime are left unchanged
SetAttributes,SetAccessControl)LastAccessTime is set to the current time
CreationTime and LastWriteTime are left unchanged
Move)LastAccessTime is set to the current time
CreationTime and LastWriteTime are left unchanged
Copy)CreationTime and LastAccessTime of the copied file in the destination directory is set to the current time
LastWriteTime and all times of the source file are left unchanged