复制文件而不使用Windows文件缓存 [英] Copy a file without using the windows file cache
本文介绍了复制文件而不使用Windows文件缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
典型用途是将大文件从USB驱动器或服务器复制到本地机。如果文件很大,Windows似乎将所有东西都交换出去,例如2GiB。
比较喜欢C#中的例子,但是我猜如果可能的话,这将是一些Win32调用。
解决方案
更重要的是,有FILE_FLAG_WRITE_THROUGH和FILE_FLAG_NO_BUFFERING。
MSDN对它们都有很好的文章: http://support.microsoft.com/kb/99794
Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache?
Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, e.g. 2GiB.
Prefer example in C#, but I'm guessing this would be a Win32 call of some sort if possible.
解决方案
Even more important, there are FILE_FLAG_WRITE_THROUGH and FILE_FLAG_NO_BUFFERING.
MSDN has a nice article on them both: http://support.microsoft.com/kb/99794
这篇关于复制文件而不使用Windows文件缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文