Skip to content

add fields: path and download_uri for ArtifactoryFileStat#488

Closed
donhui wants to merge 1 commit into
devopshq:masterfrom
donhui:donhui-0929
Closed

add fields: path and download_uri for ArtifactoryFileStat#488
donhui wants to merge 1 commit into
devopshq:masterfrom
donhui:donhui-0929

Conversation

@donhui

@donhui donhui commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

add fields: path and download_uri for ArtifactoryFileStat.

@allburov

Copy link
Copy Markdown
Member

Thanks @donhui! I went a slightly different route in #504 and credited you as co-author.

Instead of adding the fields to the ArtifactoryFileStat namedtuple, it adds ArtifactoryPath.stat_json(), which returns the File Info response as-is — so you get downloadUri and path, plus anything else the server sends:

stat = path.stat_json()
print(stat["downloadUri"])
print(stat["path"])

The reasoning is that stat() should keep a fixed, documented field set, the way pathlib.Path.stat() returns an os.stat_result — and growing the namedtuple means a new PR for every field JFrog adds. The accessor already had get_stat_json(); it just wasn't reachable without going through path._accessor.

Closing in favour of #504.

@allburov allburov closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants