Skip to content

Conversation

@carlossanlop
Copy link
Contributor

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
@ghost
Copy link

ghost commented Jul 17, 2024

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.

@ghost
Copy link

ghost commented Jul 17, 2024

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.

@dotnet-policy-service
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 <[email protected]>
@carlossanlop carlossanlop requested a review from ericstj July 19, 2024 20:51
@carlossanlop
Copy link
Contributor Author

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 carlossanlop requested a review from ericstj July 20, 2024 00:37
@carlossanlop
Copy link
Contributor Author

/ba-g Failures unrelated

@carlossanlop carlossanlop merged commit 58e8c0c into dotnet:main Jul 22, 2024
@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

Development

Successfully merging this pull request may close these issues.

[API Proposal]: In TarEntry objects emitted by TarReader, make the offset to the entry data in enclosing stream a public property

3 participants