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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With