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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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