예제 #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
파일: FileSystem.cs 프로젝트: erxdkh/azos
 protected internal virtual Task DoWriteAsync(FileSystemStream stream, byte[] buffer, int offset, int count, CancellationToken ct)
 {
     return(TaskUtils.AsCompletedTask(() => stream.Write(buffer, offset, count)));
 }
예제 #3
0
파일: FileSystem.cs 프로젝트: erxdkh/azos
 protected internal virtual Task DoFlushAsync(FileSystemStream stream, CancellationToken cancellationToken)
 {
     return(TaskUtils.AsCompletedTask(stream.Flush));
 }