Documentation ¶
Index ¶
- Constants
- func KnownFSTypes() []string
- type Mux
- func (m *Mux) DefaultWriteFS() qfs.Filesystem
- func (m *Mux) Delete(ctx context.Context, path string) (err error)
- func (m *Mux) Done() <-chan struct{}
- func (m *Mux) DoneErr() error
- func (m *Mux) Filesystem(fsType string) qfs.Filesystem
- func (m *Mux) Get(ctx context.Context, path string) (qfs.File, error)
- func (m *Mux) Has(ctx context.Context, path string) (bool, error)
- func (m *Mux) Put(ctx context.Context, file qfs.File) (resPath string, err error)
- func (m *Mux) SetFilesystem(fs qfs.Filesystem) error
- func (m *Mux) Type() string
Constants ¶
const FilestoreType = "mux"
FilestoreType uniquely identifies the mux filestore
Variables ¶
This section is empty.
Functions ¶
func KnownFSTypes ¶ added in v0.6.0
func KnownFSTypes() []string
KnownFSTypes gives the set of filesystems known to muxfs.New
Types ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux multiplexes together multiple filesystems using path multiplexing. It's a way to use multiple filesystem implementations as a single FS
func New ¶ added in v0.4.2
New creates a new Mux Filesystem, if no Option funcs are provided, New uses a default set of Option funcs. Any Option functions passed to this function must check whether their fields are nil or not. The first configured filesystem that implements the qfs.AddingFS interface becomes the default filesystem returned by DefaultWriteFS
func (*Mux) DefaultWriteFS ¶ added in v0.4.2
func (m *Mux) DefaultWriteFS() qfs.Filesystem
DefaultWriteFS gives the muxer's configured write destination
func (*Mux) Done ¶ added in v0.4.2
func (m *Mux) Done() <-chan struct{}
Done implements the qfs.ReleasingFilesystem interface
func (*Mux) DoneErr ¶ added in v0.4.2
DoneErr will return any error value after the done channel is closed
func (*Mux) Filesystem ¶ added in v0.4.2
func (m *Mux) Filesystem(fsType string) qfs.Filesystem
Filesystem returns the filesystem for a given fs type string, nil if no filesystem for fsType exists
func (*Mux) Put ¶ added in v0.4.2
Put places a file or directory on the filesystem, returning the root path. The returned path may or may not honor the path of the given file
func (*Mux) SetFilesystem ¶ added in v0.4.2
func (m *Mux) SetFilesystem(fs qfs.Filesystem) error
SetFilesystem designates the resolver for a given path kind string