fsutil

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist error = errors.New("no file/folder found")
)

Functions

func BasePaths added in v1.5.0

func BasePaths(src string) string

func CleanPaths added in v1.5.0

func CleanPaths(src string) string

func CopyAll added in v1.5.0

func CopyAll(src, dst string) error

func DirPath added in v1.5.0

func DirPath(src string) string

func Ext added in v1.5.0

func Ext(src string) string

func GetRunPath added in v1.4.0

func GetRunPath() (r string)

func IsDir added in v0.0.11

func IsDir(path string) bool

func IsExist added in v1.5.0

func IsExist(path string) bool

func IsFile added in v0.0.11

func IsFile(path string) bool

func JoinPaths added in v1.5.0

func JoinPaths(v ...string) string

func Mkdir added in v1.5.0

func Mkdir(path string, mode ...fs.FileMode) error

func ReadDir added in v1.5.0

func ReadDir(path string) (f []string)

func ReadDirAll added in v1.5.0

func ReadDirAll(path string) (f []string)

func ReadDirRaw added in v1.5.0

func ReadDirRaw(r string) ([]fs.DirEntry, error)

func SplitPath added in v1.5.0

func SplitPath(src string) (string, string)

Types

type FS added in v1.2.0

type FS struct {
	Path  string
	Data  string
	TRUNC bool
}

func File added in v0.0.11

func File(src string) *FS

func (*FS) CopyTo added in v1.3.0

func (f *FS) CopyTo(dst string) error

func (*FS) SetTrunc added in v1.2.0

func (f *FS) SetTrunc() *FS

func (*FS) Write added in v1.2.0

func (f *FS) Write(d any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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