filterfs

package module
v0.0.0-...-5284f0d Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 3 Imported by: 0

README

Package filterfs provides fs.FS wrappers that filters the filesystem, by including/excluding only specific files.

MIT license.

Documentation

Overview

Package filterfs provides fs.FS wrappers that filter filesystems. Filters can include or exclude only specific files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExcludeFn

func ExcludeFn(fsys fs.FS, hide func(string) bool) fs.FS

ExcludeFn returns a filesystem identical to fsys excluding paths for which hide(path) returns true. Hiding a directory hides all contained subdirectories and files. ExcludeFn panics if hide(".") returns true.

func ExcludePaths

func ExcludePaths(fsys fs.FS, hide ...string) fs.FS

ExcludePaths returns a filesystem identical to fsys excluding all paths in hide. Hiding a directory hides all contained subdirectories and files. ExcludePaths panics if hide includes the path ".".

Types

This section is empty.

Jump to

Keyboard shortcuts

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