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