Is it possible to determine a specific file's fragmentation status (that is, the amount of distinct fragments this file occupies)? If so, how can this be done using .net?
The motivation is this: my application is keeping data in a FileStream, changing its size on-demand. This eventually causes the file to be fragmented. I'd like to monitor the file's fragmentation status, and based upon that - make a decision if the file should be copied and replaced by a new file (thus "defragmenting" it without making changes to the MFT).