-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Tar async APIs #70574
Merged
Merged
Implement Tar async APIs #70574
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
bd7cd72
ref: TarEntry.ExtractToFileAsync
carlossanlop dcc070a
src: Implement TarEntry.ExtractToFileAsync
carlossanlop a6024cf
ref: Add TarReader.GetNextEntryAsync
carlossanlop a36e1dc
src: Implement TarReader.GetNextEntryAsync
carlossanlop cb2926e
ref: Add TarWriter.WriteEntryAsync
carlossanlop 5f2249c
src: Implement TarWriter.WriteEntryAsync
carlossanlop 24a26dd
ref: Add TarFile.CreateFromDirectoryAsync
carlossanlop 2fdfeeb
src: Implement TarFile.CreateFromDirectoryAsync
carlossanlop ea2fc3e
ref: Add TarFile.ExtractToDirectoryAsync
carlossanlop a36a455
src: Implement TarFile.ExtractToDirectoryAsync
carlossanlop bfa8831
ref: Add TarWriter.DisposeAsync
carlossanlop 259d5d7
src: Implement TarWriter.DisposeAsync
carlossanlop 2999ff7
ref: Add TarReader.DisposeAsync
carlossanlop cb6996a
src: Implement TarReader.DisposeAsync
carlossanlop beb29b6
Don't use partial methods in TarEntry.
carlossanlop e8e40cb
Don't use partial methods in TarWriter.
carlossanlop 9aeffa4
TarFile exceptions async handling.
carlossanlop ea3fab0
Move TarWriter awaited code to separate methods.
carlossanlop 99234b2
Update Global Extended Attributes async methods to the latest rebase.
carlossanlop 6cbd587
Remove unused parameter in SetModeOnFile after latest rebase that use…
carlossanlop 1ba88bf
Adjust TarEntry async methods to handle exceptions properly.
carlossanlop e5a9c9b
ref: Restore System.IAsyncDisposable inheritance in TarReader, it was…
carlossanlop c9dbfe6
Add async tests for TarReader.TarEntry.ExtractToFile.
carlossanlop e0029e9
Adjust rented buffer handling based on feedback.
carlossanlop c657666
This needs to be awaited.
carlossanlop 97f31d9
Reserve ArrayPool in TarWriter WriteEntryAsyncInternal, not MemoryPoo…
carlossanlop 4248de9
Split writing methods in TarHeader into span based and memory based.
carlossanlop dcd9dfc
tests: TarReader.GetNextEntryAsync.
carlossanlop 244f844
Uncomment InlineData from sync file reading method.
carlossanlop b3fa156
Simplify exception handling. Only return *Task.FromException in publi…
carlossanlop ffa5115
Make the TarHeader async methods static if they depend on the struct …
carlossanlop d45b9ad
Add missing GEA changes from the last PR.
carlossanlop 3c5b92f
TarReader GetNextEntryAsync tests for file assets.
carlossanlop 23894be
Add async compressed tar tests.
carlossanlop 2ff86ec
Adjust checksum calculation and saving after writing in async methods.
carlossanlop 9f674b0
Add async V7 checksum verification test.
carlossanlop c5019b8
Fix await using for FileStreams in TarFile. Move awaited code to inte…
carlossanlop c742415
Add async tests for TarFile.CreateFromDirectoryAsync for file assets.
carlossanlop bf86f37
Add async tests for TarFile.CreateFromDirectoryAsync for streams.
carlossanlop b750e1b
Add async tests for TarFile.ExtractToDirectoryAsync for file assets.
carlossanlop aa3eb3e
Add async tests for TarFile.ExtractToDirectoryAsync for streams.
carlossanlop 1074f11
Add tests for TarFile.ExtractToDirectoryAsync platform specific.
carlossanlop d69965b
Add TarEntry.ExtractToFileAsync tests
carlossanlop ed71ab1
Join "regular entry vs writer format" tests into single theory test.
carlossanlop 02b2a08
Missing using directive in Unix test file.
carlossanlop 915d5f9
Add TarWriter.WriteEntryAsync tests for entries.
carlossanlop 5eec198
Add TarWriter.WriteEntryAsync tests for file assets.
carlossanlop 39a4560
Fix test faiest failure - Windows test accidentally being run on Linux
carlossanlop fb60a8c
Set Options to Asynchornous in TarWriter internal method in Windows. …
carlossanlop 331a763
Simplify AdvanceStream* helper methods with Math.Min and ReadExactly*.
carlossanlop 188312d
Simplify CopyBytes* helper methods with ReadExactly*.
carlossanlop 216937f
Add CancellationToken handling.
carlossanlop 4b588bf
Weird spacing.
carlossanlop 82310f2
Move awaited code from GetNextEntryAsync to a private method. This pr…
carlossanlop 2f1428f
Add tests for throwing with a cancelled CancellationToken
carlossanlop 990fc1a
Simplify async calls in tests.
carlossanlop 1bf7f96
Use await using in FileStream used when extracting as regular file.
carlossanlop f6a0a18
Reuse code in TarEntry.ExtractRelativeToDirectory* methods
carlossanlop de1fa06
Reuse code in TarFile methods.
carlossanlop 71d6901
Reuse TarWriter.WriteEntry*(string,string) code.
carlossanlop f629d9b
Add tests for null check in TarWriter.WriteEntry(TarEntry)
carlossanlop 2496e12
Revert renaming of TarHeader.Read methods. Not needed.
carlossanlop 66f851d
Remove unnecessary try-finally in TarHeader.TryGetNextHeader
carlossanlop bc9c1fd
GetDataStreamAsync should return a null if size is 0, not a MemoryStr…
carlossanlop 4733094
Reuse code in TarHeader.ReadExtendedAttributesBlock*
carlossanlop 5f8f30c
Make GetBasePathForcreateFromDirectory a one-liner.
carlossanlop 631c2ce
Make internal argument verification methods conditioned to debug.
carlossanlop 0f0a5ba
Use stackalloc in TryGetNextHeader instead of ArrayPool rent.
carlossanlop 6cd55bc
Use Array.MaxLength instead of int.MaxValue for array size pre-checks.
carlossanlop eaa1e85
Use Math.Min for minimumLength in ArrayPool rent in CopyBytes* methods.
carlossanlop 78b8e2a
spacing
carlossanlop 8552796
Only one WriteLeftAlignedBytesAndGetChecksum method is needed. Revert…
carlossanlop 3d444c2
Remove unnecessary TarHeader.Write memory-based methods, use only spa…
carlossanlop 9e173af
Unused directive.
carlossanlop 433c804
Prevent test failure in async tests due to race condition.
carlossanlop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like there is no need to check for the cancellation again here, as
ReadAsync
(the caller) always does thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that the token cancellation status should be checked on every method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as some work was executed between them (so it could have actually changed in the meantime). At least this is how I see it.