Пример #1
0
 public static bool IsNetworkDriveOnline(string driveRoot, int timeout)
 {
     try
     {
         string uncPath = WNet.GetRemoteUniversalName(driveRoot).UniversalName;
         return(IsSMBAvailable(uncPath, timeout));
     }
     catch
     {
         return(false);
     }
 }
Пример #2
0
 public static bool IsNetworkDriveMapped(string driveRoot)
 {
     try
     {
         string uncPath = WNet.GetRemoteUniversalName(driveRoot).UniversalName;
         return(!String.IsNullOrEmpty(uncPath));
     }
     catch
     {
         return(false);
     }
 }