コード例 #1
0
 public SevenZipOutFileStream(FileInfo aFile, long aSize, ThreadIOPriority aPriority)
     : base(aFile, FileMode.Create, FileAccess.ReadWrite, WRITE_BUFFER_SIZE)
 {
     file = aFile;
       fileSize = aSize;
       if (fileSize > 0) {
     stream.SetLength(fileSize);
     stream.Flush();
       }
       if (fileSize > BUFFER_SIZE) {
     lp = new IOPriority(aPriority);
       }
 }
コード例 #2
0
 public override void Dispose()
 {
     base.Dispose();
       if (lp != null) {
     lp.Dispose();
     lp = null;
       }
       if (!ok) {
     try {
       file.Delete();
     }
     catch (Exception) {
     }
       }
 }