Beispiel #1
0
 public override void Body(Stream target, int begin, int end)
 {
     try
     {
         var file = new SmbRandomAccessFile(FromUri.ToString(), "r", 0x00000001);
         file.Seek(begin);
         var bytes = new byte[end - begin];
         file.Read(bytes, 0, bytes.Length);
         target.Write(bytes, 0, bytes.Length);
     }
     catch (Exception e)
     {
         Reset();
         throw;
     }
 }
Beispiel #2
0
 public override DnHead Head()
 {
     try
     {
         var file = new SmbFile(FromUri.ToString());
         var len  = (int)file.Length();
         return(new DnHead()
         {
             Size = len
         });
     }
     catch (Exception e)
     {
         Reset();
         throw;
     }
 }