Repository navigation
Add share-link ls for folder shared links - #402
Merged
AndreyVMarkelov merged 4 commits intoNov 12, 2026
Merged
AndreyVMarkelov merged 4 commits into
AndreyVMarkelov merged 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
List the contents of a folder shared link before choosing a path to inspect or download, including when the folder is not mounted in the caller's Dropbox.
Adds
dbxcli share-link ls <url> [--path /subfolder] [--recursive]with the existing password flags and JSON v1 output. Default text output shows paths in columns, likedbxcli ls;--long(-l) shows type, human-readable file size, and path. Empty folders produce no default text output. Paths stay relative to the shared-link root, including with--path, and results are sorted by path. Repeated/trailing slashes and.components are normalized throughvalidatePath;.., backslashes, and NUL bytes are rejected before normalization.Reuses the download pagination/path helpers, preserves wrapped API errors, and emits no successful partial listing after traversal failures. Dropbox entry names are validated independently of the host OS; colons and Windows device names are remote names, with local filesystem restrictions checked separately when mapping download destinations.
share-link listcontinues to list shared links themselves. JSON result metadata is identical with and without-l; input metadata includeslong: truewhen requested.Updates command/help metadata, JSON schemas and golden fixtures, generated docs, and regression tests for both formats, empty folders, column wrapping, JSON metadata/schema consistency, path normalization, Unicode NFC/NFD, Windows-style names, and local download path guards.
Actual output from the built CLI against a live password-protected fixture:
Validation:
go fmt ./...,go vet ./...,go test ./...,go test -race ./cmd/..., andgo build ./...passed.--path //documents,/documents/, and//documents//./all normalize to/documents; the listing preserved server-returned Unicode names plusCON,C:notes.txt, andreport?.txt. JSON validation and fixture cleanup passed.-ltext output on the same live password-protected folder; both JSON variants validate against the schema and have identical results. All disposable fixture links/folders were cleaned up.Live pagination was not forced, and a separate-account/unmounted-folder live check remains unverified; both have mock regression coverage. Listings buffer compact result records in memory for sorting and all-or-error output.
Closes #395.