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

Move fs interface to separate package and simplify #120

Merged
merged 6 commits into from
Mar 7, 2025
Merged

Conversation

srerickson
Copy link
Owner

@srerickson srerickson commented Mar 5, 2025

The filesystem abstraction (formerly ocfl.FS) is moved to a separate package, in the fs directory.

The new FS interface only includes a single method, OpenFile(). There is also a new interface DirEntriesFS for reading directories. The idea is that directory support often isn't needed. You can use an OCFL object without listing the contents of a directory, so the backends shouldn't be required to implement directory listing. This enables simple backends for reading objects (e.g., over plain http).

I also simplified some of the file iteration logic, removing the dedicated iterator types.

@srerickson srerickson merged commit 2c71f1b into main Mar 7, 2025
1 check passed
@srerickson srerickson deleted the new-fs branch March 7, 2025 17:25
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.

1 participant