fs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFiles

func AllFiles(afs afero.Fs) ([]string, error)

func NewMatcherFs

func NewMatcherFs(source afero.Fs, m Matcher) afero.Fs

Types

type Matcher

type Matcher interface {
	Match(s string) bool
}

func And

func And(ms ...Matcher) Matcher

func Glob

func Glob(pattern string) Matcher

func GlobMatchers added in v0.2.1

func GlobMatchers(paths []string) Matcher

func IncludeExcludeMatcher added in v0.2.1

func IncludeExcludeMatcher(includedPaths []string, excludedPaths []string) Matcher

func NewAllMatcher added in v0.2.1

func NewAllMatcher() Matcher

func Not

func Not(m Matcher) Matcher

func Or

func Or(ms ...Matcher) Matcher

type MatcherFs

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

func (*MatcherFs) Chmod

func (mfs *MatcherFs) Chmod(name string, mode fs.FileMode) error

Chmod implements afero.Fs

func (*MatcherFs) Chown

func (mfs *MatcherFs) Chown(name string, uid int, gid int) error

Chown implements afero.Fs

func (*MatcherFs) Chtimes

func (mfs *MatcherFs) Chtimes(name string, atime time.Time, mtime time.Time) error

Chtimes implements afero.Fs

func (*MatcherFs) Create

func (mfs *MatcherFs) Create(name string) (afero.File, error)

Create implements afero.Fs

func (*MatcherFs) Mkdir

func (mfs *MatcherFs) Mkdir(name string, perm fs.FileMode) error

Mkdir implements afero.Fs

func (*MatcherFs) MkdirAll

func (mfs *MatcherFs) MkdirAll(path string, perm fs.FileMode) error

MkdirAll implements afero.Fs

func (*MatcherFs) Name

func (*MatcherFs) Name() string

Name implements afero.Fs

func (*MatcherFs) Open

func (mfs *MatcherFs) Open(name string) (afero.File, error)

Open implements afero.Fs

func (*MatcherFs) OpenFile

func (mfs *MatcherFs) OpenFile(name string, flag int, perm fs.FileMode) (afero.File, error)

OpenFile implements afero.Fs

func (*MatcherFs) Remove

func (mfs *MatcherFs) Remove(name string) error

Remove implements afero.Fs

func (*MatcherFs) RemoveAll

func (mfs *MatcherFs) RemoveAll(path string) error

RemoveAll implements afero.Fs

func (*MatcherFs) Rename

func (mfs *MatcherFs) Rename(oldname string, newname string) error

Rename implements afero.Fs

func (*MatcherFs) Stat

func (mfs *MatcherFs) Stat(name string) (fs.FileInfo, error)

Stat implements afero.Fs

type MatherFile

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

func (*MatherFile) Close

func (mf *MatherFile) Close() error

func (*MatherFile) Name

func (mf *MatherFile) Name() string

func (*MatherFile) Read

func (mf *MatherFile) Read(p []byte) (n int, err error)

func (*MatherFile) ReadAt

func (mf *MatherFile) ReadAt(p []byte, off int64) (n int, err error)

func (*MatherFile) Readdir

func (mf *MatherFile) Readdir(count int) ([]os.FileInfo, error)

func (*MatherFile) Readdirnames

func (mf *MatherFile) Readdirnames(count int) ([]string, error)

func (*MatherFile) Seek

func (mf *MatherFile) Seek(offset int64, whence int) (int64, error)

func (*MatherFile) Stat

func (mf *MatherFile) Stat() (os.FileInfo, error)

func (*MatherFile) Sync

func (mf *MatherFile) Sync() error

func (*MatherFile) Truncate

func (mf *MatherFile) Truncate(size int64) error

func (*MatherFile) Write

func (mf *MatherFile) Write(p []byte) (n int, err error)

func (*MatherFile) WriteAt

func (mf *MatherFile) WriteAt(p []byte, off int64) (n int, err error)

func (*MatherFile) WriteString

func (mf *MatherFile) WriteString(s string) (ret int, err error)

Jump to

Keyboard shortcuts

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