Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3: deprecate PrefixFolders and introduce HideFolders #62

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

ahouene
Copy link
Contributor

@ahouene ahouene commented Oct 5, 2023

The PrefixFolders option has a behaviour that is confusing and does not allow listing the way other backends do.
This PR deprecates PrefixFolders and introduces another option that helps work with folders in S3: HideFolders.

Its effect is pretty close to that of PrefixFolder, except that instead of just showing folders names without their content as folder/, it will ignore them.

// Example:

s3backend.Store(ctx, "foo", something)
s3backend.Store(ctx, "bar/baz", anything)

// Without HideFolders:
s3backend.List(ctx, "") // "foo", "bar/baz"

// With HideFolders:
s3backend.List(ctx, "") // "foo"
s3backend.List(ctx, "bar/") // "bar/baz"

@ahouene ahouene requested a review from wojas October 5, 2023 10:40
@ahouene ahouene merged commit 94dd98d into PowerDNS:main Oct 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants