Skip to content

Expose the TarEntry start of the data stream - #105007

Merged
carlossanlop merged 11 commits into
dotnet:mainfrom
carlossanlop:TarStreamPosition
Jul 22, 2024
Merged

Expose the TarEntry start of the data stream#105007
carlossanlop merged 11 commits into
dotnet:mainfrom
carlossanlop:TarStreamPosition

Conversation

@carlossanlop

Copy link
Copy Markdown
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

ghost commented Jul 17, 2024

Copy link
Copy Markdown

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

ghost commented Jul 17, 2024

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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

Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs
Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.cs Outdated
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Comment thread src/libraries/System.Formats.Tar/tests/TarEntry/GnuTarEntry.Tests.cs Outdated
Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.cs Outdated
Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.Write.cs Outdated
@carlossanlop
carlossanlop requested a review from ericstj July 19, 2024 20:51

@ericstj ericstj left a comment

Copy link
Copy Markdown
Member

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?

Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.cs Outdated
Comment thread src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHeader.cs Outdated
Comment thread src/libraries/System.Formats.Tar/tests/TarEntry/GnuTarEntry.Tests.cs Outdated
@carlossanlop
carlossanlop requested a review from ericstj July 20, 2024 00:37
@carlossanlop

Copy link
Copy Markdown
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

@ericstj ericstj left a comment

Copy link
Copy Markdown
Member

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

3 participants