Skip to content

Support an interface to discover a backing filesystem #553

Description

@wrouesnel

I have a couple of use-cases where what I'd really like to know when dealing with an afero filesystem - say an BasePathFS or a ReadOnlyFS - is what the underlying filesystem that's being wrapped is.

This is in effect kind of asking for a "unsafe" mode - under some circumstances, is for example the filesystem is backed by OsFs then I'd like to know so I can choose to run a different type of operation that is either more efficient or possible. In my specific case it's choosing between serving git repositories using the git binary or serving them using go-git (which is considerably slower) - but in both cases I need to discover that OsFs is what's there, and extract a path to send to the git binary to operate with (while acknowledging I might be violating some assumptions).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions