예제 #1
0
 /// <summary>
 /// <see cref="IDevice.RemoveSegment(int)"/>
 /// </summary>
 /// <param name="segment"></param>
 public override void RemoveSegment(int segment)
 {
     if (logHandles.TryRemove(segment, out SafeFileHandle logHandle))
     {
         logHandle.Dispose();
         Native32.DeleteFileW(GetSegmentName(segment));
     }
 }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="fromSegment"></param>
 /// <param name="toSegment"></param>
 public override void DeleteSegmentRange(int fromSegment, int toSegment)
 {
     for (int i = fromSegment; i < toSegment; i++)
     {
         if (logHandles.TryRemove(i, out SafeFileHandle logHandle))
         {
             logHandle.Dispose();
             Native32.DeleteFileW(GetSegmentName(i));
         }
     }
 }