mergefs

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package mergefs provides support for merging multiple filesystems together.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(filesystems ...fs.FS) fs.FS

Merge merges the given filesystems together,

Types

type MergedFS

type MergedFS struct {
	// contains filtered or unexported fields
}

MergedFS combines filesystems. Each filesystem can serve different paths. The first FS takes precedence

func (MergedFS) Open

func (mfs MergedFS) Open(name string) (fs.File, error)

Open opens the named file.

func (MergedFS) ReadDir

func (mfs MergedFS) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir reads from the directory, and produces a DirEntry array of different directories.

It iterates through all different filesystems that exist in the mfs MergeFS filesystem slice and it identifies overlapping directories that exist in different filesystems

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL