Skip to content
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

Expose the TarEntry start of the data stream #105007

Merged
merged 11 commits into from
Jul 22, 2024

Conversation

carlossanlop
Copy link
Member

Fixes #101314

Implements the API below to allow users know where the entry's data first byte is located with respect to the parent archive stream.

namespace System.Formats.Tar;

public abstract partial class TarEntry
{
    public long DataOffset { get; }
}

cc @martinpf

@carlossanlop carlossanlop added partner-impact This issue impacts a partner who needs to be kept updated area-System.Formats.Tar labels Jul 17, 2024
@carlossanlop carlossanlop added this to the 9.0.0 milestone Jul 17, 2024
@carlossanlop carlossanlop self-assigned this Jul 17, 2024
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-formats-tar
See info in area-owners.md if you want to be subscribed.

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple small suggestions. Also - as I mentioned offline - can we add any offset validation to the real-world TAR files from System.Formats.Tar.TestData?

@carlossanlop
Copy link
Member Author

/ba-g Failures unrelated

@carlossanlop carlossanlop merged commit 58e8c0c into dotnet:main Jul 22, 2024
79 of 84 checks passed
@carlossanlop carlossanlop deleted the TarStreamPosition branch July 22, 2024 15:17
Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Formats.Tar new-api-needs-documentation partner-impact This issue impacts a partner who needs to be kept updated
Projects
None yet
3 participants