예제 #1
0
 private void copyStream(FileSystemStream from, FileSystemStream to, byte[] buffer)
 {
     while (true)
     {
         var read = from.Read(buffer, 0, buffer.Length);
         if (read <= 0)
         {
             break;
         }
         to.Write(buffer, 0, read);
     }
 }
예제 #2
0
 private void copyStream(FileSystemStream from, FileSystemStream to, byte[] buffer)
 {
    while(true)
    {
      var read = from.Read(buffer, 0, buffer.Length);
      if (read<=0) break;
      to.Write(buffer, 0, read); 
    }
 } 
예제 #3
0
 protected internal virtual Task DoWriteAsync(FileSystemStream stream, byte[] buffer, int offset, int count, CancellationToken ct)
 {
     return(TaskUtils.AsCompletedTask(() => stream.Write(buffer, offset, count)));
 }