fs

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fs provides a mockable wrapper for io/fs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) FileInfoToDirEntry

func (*Impl) FileInfoToDirEntry(info fs.FileInfo) fs.DirEntry

func (*Impl) Glob

func (*Impl) Glob(fsys fs.FS, pattern string) (matches []string, err error)

func (*Impl) ReadDir

func (*Impl) ReadDir(fsys fs.FS, name string) ([]fs.DirEntry, error)

func (*Impl) ReadFile

func (*Impl) ReadFile(fsys fs.FS, name string) ([]byte, error)

func (*Impl) Stat

func (*Impl) Stat(fsys fs.FS, name string) (fs.FileInfo, error)

func (*Impl) Sub

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

func (*Impl) ValidPath

func (*Impl) ValidPath(name string) bool

func (*Impl) WalkDir

func (*Impl) WalkDir(fsys fs.FS, root string, fn fs.WalkDirFunc) error

type Interface

type Interface interface {
	FileInfoToDirEntry(info fs.FileInfo) fs.DirEntry
	Glob(fsys fs.FS, pattern string) (matches []string, err error)
	ReadDir(fsys fs.FS, name string) ([]fs.DirEntry, error)
	ReadFile(fsys fs.FS, name string) ([]byte, error)
	Stat(fsys fs.FS, name string) (fs.FileInfo, error)
	Sub(fsys fs.FS, dir string) (fs.FS, error)
	ValidPath(name string) bool
	WalkDir(fsys fs.FS, root string, fn fs.WalkDirFunc) error
}

Jump to

Keyboard shortcuts

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