private async ValueTask <FileInformation> LoadLargeFile(IFile file) { await using var fileStream = file.OpenRead(); var hash = _fileHasher.ComputeHash(fileStream); return(new FileInformation(file.Filename, file.CreatedOn, file.ModifiedOn, hash, file.Length, file.CreatedOn, null, file.RelativeFilename)); }
private Hash ComputeHash(IFile file) { using var stream = file.OpenRead(); return(_fileHasher.ComputeHash(stream)); }