fs

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExt

func AddExt(path string, ext string) string

func Chmod

func Chmod(name string, mode os.FileMode) error

func ChmodStrict added in v0.1.32

func ChmodStrict(name string, mode os.FileMode)

func Create

func Create(filename string) (f *os.File, err error)

func CreateStrict added in v0.1.32

func CreateStrict(filename string) *os.File

func DirSize

func DirSize(path string) (size int64, err error)

func DirSizeStrict added in v0.1.32

func DirSizeStrict(path string) int64

func DotExt

func DotExt(ext string) string

func EqualExt

func EqualExt(extA, extB string) bool

func Exist

func Exist(path string) bool

func Ext

func Ext(path string) string

func FileModifyTime added in v0.1.32

func FileModifyTime(path string) (time.Time, error)

func FileModifyTimeStrict added in v0.1.32

func FileModifyTimeStrict(path string) time.Time

func FileSize

func FileSize(path string) (int64, error)

func FileSizeStrict added in v0.1.32

func FileSizeStrict(path string) int64

func ForEachLine added in v0.1.54

func ForEachLine(path string, fn func(string)) error

func IsDir

func IsDir(path string) (bool, error)

func IsDirStrict added in v0.1.32

func IsDirStrict(path string) bool

func MakeDir

func MakeDir(dir string) error

func MakeDirStrict added in v0.1.32

func MakeDirStrict(dir string)

func Read

func Read(path string) ([]byte, error)

func ReadCSV added in v0.1.20

func ReadCSV(path string) (records [][]string, err error)

func ReadCSVstrict added in v0.1.32

func ReadCSVstrict(path string) [][]string

func ReadDir

func ReadDir(dir string, ignorAccessDenied bool) (files []os.FileInfo, err error)

func ReadDirStrict added in v0.1.32

func ReadDirStrict(dir string, ignorAccessDenied bool) []os.FileInfo

func ReadLines

func ReadLines(path string) ([]string, error)

func ReadLinesStrict added in v0.1.32

func ReadLinesStrict(path string) []string

func ReadStrict added in v0.1.32

func ReadStrict(path string) []byte

func ReadString

func ReadString(path string) (string, error)

func ReadStringStrict added in v0.1.32

func ReadStringStrict(path string) string

func Remove

func Remove(path string) error

func RemoveExt

func RemoveExt(path string) string

func RemoveStrict added in v0.1.32

func RemoveStrict(path string)

func Rename

func Rename(path, newName string) error

func RenameStrict added in v0.1.32

func RenameStrict(path, newName string)

func ReplaceExt

func ReplaceExt(path string, ext string) string

func Write

func Write(path string, content []byte) error

func WriteCSV added in v0.1.20

func WriteCSV(path string, records [][]string) error

func WriteCSVstrict added in v0.1.32

func WriteCSVstrict(path string, records [][]string)

func WriteStrict added in v0.1.32

func WriteStrict(path string, content []byte)

func WriteString

func WriteString(path string, content string) error

Types

type List

type List struct {
	Files             bool
	Folders           bool
	Extension         string
	ExtensionList     []string
	Recursive         bool
	IgnorAccessDenied bool
	RelativePath      bool
	// contains filtered or unexported fields
}

func (List) Get added in v0.1.4

func (this List) Get(dir string) (result []string, err error)

func (List) GetStrict added in v0.1.32

func (this List) GetStrict(dir string) []string

Jump to

Keyboard shortcuts

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