Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

File.GetLastAccessTime() + similar methods

Open ghost opened this issue 3 years ago • 2 comments

What is the usecase for this plug

foreach(string str in System.IO.Directory.GetFiles("0:/"))
{
    Console.WriteLine(str + " > " + System.IO.File.GetLastAccessTime(str));
}

Complexity of plug No idea

Describe alternatives you've considered Writing a giant file access log system which would be way too hard

Additional context @quajak said it should be implemented as FAT supports them

ghost avatar Aug 17 '21 19:08 ghost

It seems like we are missing a few formatting plugs, which should be doable (maybe wait for .Net 5.0 to see how this will change). Internally, it looks like FatDirectoryEntry.cs needs methods to set creation time and update Modified/Access time. These methods will also have to be added to the FileSystem interface. We will then most likely have to plug some level of GetLastAccessTime and similar at some level to access the information from the fat file system.

quajak avatar Aug 17 '21 19:08 quajak

https://github.com/CosmosOS/Cosmos/blob/f305364f1dfe02d410de53a692e22ba842e7c762/source/Cosmos.System2/FileSystem/FAT/Listing/FatDiretoryEntry.cs#L294

quajak avatar Sep 19 '21 21:09 quajak