我想将一些内容写入文件,例如
using( var fs = File.OpenWrite( file ) )
{
fs.Write( bytes, 0, bytes.Length );
}
然而,这会更改"上次写入时间"。稍后我可以通过使用
File.SetLastWriteTime( file, <old last write time> );
但与此同时,FileSystemWatcher 已经被触发。
现在我的问题是:是否有可能在不改变“最后写入时间”的情况下编写文件?
FileSystemWatcher
不一定在我的控制之下。/ - tanascius