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

segregate virtual fs #194

Closed
plastikfan opened this issue Sep 27, 2024 · 0 comments · Fixed by #201
Closed

segregate virtual fs #194

plastikfan opened this issue Sep 27, 2024 · 0 comments · Fixed by #201
Assignees
Labels
feature New feature or request

Comments

@plastikfan
Copy link
Contributor

plastikfan commented Sep 27, 2024

In the same way that there is a Walk function for both the native file system (filepath.WalkDir) and virtual file system (fs.WalkDir), we should aim to support both of these in traverse. Up to now, I wasn't fully aware of the very significant but subtle differences between the two, resulting in an accidentally confused hybrid between the two. So currently, we only have an implementation for virtual file system but this is fully baked into the implementation without an intermediate abstraction.

This issue will simply ensure that the current support for the virtual fs is abstracted so that clear support for the local file system can be added by another issue.

The fileSystems object needs to be abstracted away with some kind of adapter, so that it can be substitued by a composite fs or afero. Also, each individual internal fs type needs to be replaceable by any of the afero interface types, so this could be tricky, but necessary. Actually, we should internally support our internal interfaces and then write afero adapters which translate these internal calls into afero calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant