Skip to content

Conversation

@wrouesnel
Copy link

WrappedFS implements an optional interface to allow an afero.FS to be dereferenced to yield the underlying filesystem it is wrapping. It does not make sense in all circumstances, but can provide for example to allow determining if an afero filesystem is backed by an underlying OsFs.

Closes #553

Draft PR to highlight the basic idea and solicit feedback - does this make sense?

The specific use case I have is holding something like ReadOnlyFs(OsFS()) and wanting to make sure that the underlying path is actually a filesystem path (in which case, acknowledging it's unsafe, I should be able to hand it off to a subprocess).

WrappedFS implements an optional interface to allow an afero.FS to be
dereferenced to yield the underlying filesystem it is wrapping. It does not
make sense in all circumstances, but can provide for example to allow determining
if an afero filesystem is backed by an underlying OsFs.
@CLAassistant
Copy link

CLAassistant commented Oct 21, 2025

CLA assistant check
All committers have signed the CLA.

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.

Support an interface to discover a backing filesystem

2 participants