jjzjj

driveBasedOnPath

全部标签

c# - 检测路径是否指向 NTFS 分区

给定绝对文件系统路径,我如何检测它是否在NTFS分区上?我更喜欢C#的帮助,但Win32/C会做。软件运行的系统为WindowsVista或更高版本。 最佳答案 //Getallthedrivesonthelocalmachine.DriveInfo[]allDrives=DriveInfo.GetDrives();//Getthepathroot.varpathRoot=Path.GetPathRoot(absoluteFilePath);//Findthedrivebasedonthepathroot.vardriveBased