try { using (var sourceStream = new FileStream(pathToDownloadedMedia, FileMode.Open, FileAccess.Read, FileShare.None, bufferSize: 4096, useAsync: true)) { using (var destinationStream = File.Create(pathToProcessedMedia)) { await sourceStream.CopyToAsync(destinationStream); } } } catch (Exception) { throw new ApplicationException(); }
FileShare.None
FileShare.ReadWrite
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)