Skip to content

Add stat_json() to get the raw file info from Artifactory#504

Open
allburov wants to merge 1 commit into
masterfrom
feature/stat-json
Open

Add stat_json() to get the raw file info from Artifactory#504
allburov wants to merge 1 commit into
masterfrom
feature/stat-json

Conversation

@allburov

Copy link
Copy Markdown
Member

Closes #488, co-authored by @donhui.

#488 wanted path and downloadUri from the File Info API. Rather than add them to the ArtifactoryFileStat namedtuple, this exposes the raw response: stat() keeps a fixed documented field set, like pathlib.Path.stat() returning an os.stat_result, and stat_json() gives everything the server sends — including any field JFrog adds later.

The accessor already had get_stat_json(); it was just unreachable without touching path._accessor.

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

Patreon Boosty

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.

1 participant