예제 #1
0
 public static void SetCacheSetting(string fileName, DiskCacheState state, bool isPowerProtected)
 {
     using (var fhandle = StorageDevice.OpenStorageDevice(fileName, FileAccess.GenericRead | FileAccess.GenericWrite))
         SetCacheSetting(fhandle, state, isPowerProtected);
 }
예제 #2
0
 public static DiskCacheState GetCacheSetting(string fileName, out bool isPowerProtected)
 {
     using (var fhandle = StorageDevice.OpenStorageDevice(fileName, FileAccess.GenericRead))
         return(GetCacheSetting(fhandle, out isPowerProtected));
 }