overlayfs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package overlyafs provides a way to overlay multiple fs.FS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS overlays multiple fs.FS.

func From

func From(stack ...fs.FS) FS

From creates a new overlay fs from the provided stack of FS. FS contents are considered in the reverse order of the provided slice. ie: the last stacked layer wins.

func (FS) Open

func (fsys FS) Open(name string) (fs.File, error)

Open opens the named file.

Open tries each overlaid filesystem in-turn, in the reverse order they were overlaid. ie: the last stacked layer wins.

func (FS) Sub

func (fsys FS) Sub(dir string) (fs.FS, error)

Sub returns an FS corresponding to the subtree rooted at dir.

Sub tries each overlaid filesystem in-turn, in the reverse order they were overlaid. ie: the last stacked layer wins.

Jump to

Keyboard shortcuts

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