Given an absolute file system path, how would I detect whether it’s on an NTFS partition or not? I would prefer a helping hand in C#, but Win32/C would do. The system which the software will run on, is Windows Vista or later.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
FSCTL_FILESYSTEM_GET_STATISTICSto determine the file system type.Here’s some sample code. I’ve checked that this handles mount points properly, i.e., it detects the type of the target volume, not the source volume. You don’t need to specify the mount point itself (although you can) but the file or directory you specify must exist.