FileSystemInfo.LastWriteTime setter vs File.SetLastWriteTime in .NET
Both end in the same OS call, so the timestamp written is identical. The differences are around it: which cache gets invalidated, whether directories work on Windows, how a non-UTC DateTime is converted, and whether you can target an open handle. Use File.SetLastWriteTimeUtc, by handle when the file is open. Verified on .NET 10.0.10.