public GetFileName ( |
||
request | ||
리턴 | string |
private async Task CombineAsync(FlowRequestContext context, FlowRequest request) { var filePath = string.Concat( context.GetFilePathFunc(request), "/", context.GetFileName(request)); var chunkPath = context.GetChunkPathFunc(request); var chunkFilePaths = await _fileSystem.ListDirectoryAsync(chunkPath).ConfigureAwait(false); using (var fileStream = await _fileSystem.OpenWriteAsync(filePath).ConfigureAwait(false)) { foreach (var file in chunkFilePaths) { using (var sourceStream = await _fileSystem.OpenReadAsync(file).ConfigureAwait(false)) { await sourceStream.CopyToAsync(fileStream).ConfigureAwait(false); } } await fileStream.FlushAsync().ConfigureAwait(false); } await _fileSystem.DeleteDirectoryAsync(chunkPath).ConfigureAwait(false); }
private async Task CombineAsync(FlowRequestContext context, FlowRequest request) { var filePath = string.Concat( context.GetFilePathFunc(request), "/", context.GetFileName(request)); var chunkPath = context.GetChunkPathFunc(request); var chunkFilePaths = await _fileSystem.ListDirectoryAsync(chunkPath); using (var fileStream = await _fileSystem.OpenWriteAsync(filePath)) { foreach (var file in chunkFilePaths) { using (var sourceStream = await _fileSystem.OpenReadAsync(file)) { await sourceStream.CopyToAsync(fileStream); } } await fileStream.FlushAsync(); } await _fileSystem.DeleteDirectoryAsync(chunkPath); }