Analyze file fragmentation in Windows 7

Is there a way to detect fragmentation of a single file using software tools? For example, is there any file system API that I can use to get this type of information?

+6
source share
2 answers

I just copy and paste Raymond's reply from the comments, so I marked it as a response from the community wiki .

For C / C ++, use FSCTL_GET_RETRIEVAL_POINTERS . For C #, use these wrapper classes .

+3
source

Here is a good C # cover for FSCTL_GET_RETRIEVAL_POINTERS: http://blogs.msdn.com/b/jeffrey_wall/archive/2004/09/13/229137.aspx

This shell calls the control code to return a list of the object that determines where each file is located on disk.

You probably want the GetFileMap method to retrieve this information.

-1
source

Source: https://habr.com/ru/post/914728/


All Articles