문제

In windows, have any command line or API can do the below questions (for internal hard disk)?

  1. Force sync the file's cache in the memory to disk.
  2. Clear the file's cache in the memory and reload files from the disk.
  3. Force sync the disk's file-cache in the memory to disk.
  4. Clear the disk's file-cache in the memory and reload files from the disk.

Does anyone have similar experiences?

도움이 되었습니까?

해결책 2

http://www.codeproject.com/Articles/259577/How-to-flush-a-storage-volumes-the-file-cache-lock

The link fix the question 2 and 4. Thanks for everyone's help!

다른 팁

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364439(v=vs.85).aspx

But the API is for a file, not for a disk.

Can I flush all file's buffers in the target disk?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top