fs

package
v0.0.0-...-607911e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 11 Imported by: 27

Documentation

Index

Constants

View Source
const (
	ModeDir        = iofs.ModeDir
	ModeAppend     = iofs.ModeAppend
	ModeExclusive  = iofs.ModeExclusive
	ModeTemporary  = iofs.ModeTemporary
	ModeSymlink    = iofs.ModeSymlink
	ModeDevice     = iofs.ModeDevice
	ModeNamedPipe  = iofs.ModeNamedPipe
	ModeSocket     = iofs.ModeSocket
	ModeSetuid     = iofs.ModeSetuid
	ModeSetgid     = iofs.ModeSetgid
	ModeCharDevice = iofs.ModeCharDevice
	ModeSticky     = iofs.ModeSticky
	ModeIrregular  = iofs.ModeIrregular
	ModeType       = iofs.ModeType
	ModePerm       = iofs.ModePerm
)

Variables

View Source
var (
	ErrInvalid    = iofs.ErrInvalid
	ErrPermission = iofs.ErrPermission
	ErrExist      = iofs.ErrExist
	ErrNotExist   = iofs.ErrNotExist
	ErrClosed     = iofs.ErrClosed

	SkipAll = iofs.SkipAll
	SkipDir = iofs.SkipDir
)
View Source
var (
	FormatDirEntry     = iofs.FormatDirEntry
	FormatFileInfo     = iofs.FormatFileInfo
	Glob               = iofs.Glob
	ReadFile           = iofs.ReadFile
	ValidPath          = iofs.ValidPath
	WalkDir            = iofs.WalkDir
	FileInfoToDirEntry = iofs.FileInfoToDirEntry
	ReadDir            = iofs.ReadDir
	Sub                = iofs.Sub
	Stat               = iofs.Stat
)

Functions

func DirExists

func DirExists(fsys FS, path string) (bool, error)

func Exists

func Exists(fsys FS, path string) (bool, error)

func IsDir

func IsDir(fsys FS, path string) (bool, error)

func IsEmpty

func IsEmpty(fsys FS, path string) (bool, error)

func MkdirAll

func MkdirAll(fsys FS, path string, perm FileMode) error

func TempDir

func TempDir(fsys FS, dir, prefix string) (name string, err error)

func WriteFile

func WriteFile(fsys FS, filename string, data []byte, perm FileMode) error

Types

type DirEntry

type DirEntry = iofs.DirEntry

type FS

type FS = iofs.FS

func LiveDir

func LiveDir(assets embed.FS) FS

LiveDir uses the filename of the calling source file and sees if it exists on the system to return a watchable version of that directory, otherwise it returns the assets passed in.

type File

type File = iofs.File

func OpenFile

func OpenFile(fsys FS, name string, flag int, perm os.FileMode) (File, error)

type FileInfo

type FileInfo = iofs.FileInfo

type FileMode

type FileMode = iofs.FileMode

type GlobFS

type GlobFS = iofs.GlobFS

type MutableFS

type MutableFS interface {
	StatFS

	Chmod(name string, mode FileMode) error
	Chown(name string, uid, gid int) error
	Chtimes(name string, atime time.Time, mtime time.Time) error
	Create(name string) (File, error)
	Mkdir(name string, perm FileMode) error
	MkdirAll(path string, perm FileMode) error
	OpenFile(name string, flag int, perm FileMode) (File, error)
	Remove(name string) error
	RemoveAll(path string) error
	Rename(oldname, newname string) error
}

type PathError

type PathError = iofs.PathError

type ReadDirFS

type ReadDirFS = iofs.ReadDirFS

type ReadDirFile

type ReadDirFile = iofs.ReadDirFile

type ReadFileFS

type ReadFileFS = iofs.ReadFileFS

type StatFS

type StatFS = iofs.StatFS

type SubFS

type SubFS = iofs.SubFS

type WalkDirFunc

type WalkDirFunc = iofs.WalkDirFunc

Jump to

Keyboard shortcuts

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