What's required for Windows to update the "file modified" timestamp?

Obviously it gets updated during a write operation, but are there any non-destructive operations that also force an update? Basically looking to be able to do the equivalent of the *nix touch command, but in C# programmatically.

Answers


Use the function SetFileTime (C++) or File.SetLastWriteTime (C#) to set the last write time to the current time.


Need Your Help

Converting MPG to KPL using alchemist gem

ruby-on-rails

I am using the alchemist gem: https://github.com/halogenandtoast/alchemist