as the title implies i want to know wheter a network drive is NTFS or Fat format.
For local drives and paths i used DriveInfo and it worked fine but when you try to use drive info with a network drive path i got this exception:
System.Collections.ListDictionaryInternal -Object must be a root directory ("C:\") or a drive letter ("C").
public static bool IsNtfsDrive(string directory)
{
try
{
// Get drive info
var driveInfo = new DriveInfo(directory);
// Check if drive is NTFS partition
return driveInfo.DriveFormat == Cntfs;
}
catch (Exception e)
{
Console.WriteLine("Data: " + e.Data + " -Message: " + e.Message);
return false;
}
}