Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

analyze a file's fragmentation in Windows 7

Tags:

c++

c#

windows-7

Is there a way that I can determine the fragmentation of a single file via programmatic means? For example, is there some type of file system API that I can tap into to retrieve this type of information?

like image 428
A.R. Avatar asked May 02 '12 15:05

A.R.


1 Answers

I'm just copy and pasting Raymond's reply from the comments, so I've marked it as a community wiki answer.

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

like image 179
2 revs Avatar answered Sep 21 '22 18:09

2 revs