Documentation ¶
Index ¶
- func CheckDir(p string, perm ...os.FileMode) bool
- func Exists(p string) bool
- func First(root string, findFn FilterFunc, recursion bool) (string, error)
- func FirstN(root string, limit int, findFn FilterFunc) ([]string, error)
- func First_old(path string, findFn FilterFunc, recursion bool) (string, error)
- func FormatSize(b int64) string
- func GetDirSize(p string) int64
- func GetModTime(path string) (int64, error)
- func IsDir(p string) bool
- func IsFile(p string) bool
- func Md5(file string) (fileMd5 string, err error)
- func Move(src string, dst string) error
- func ParseJSON(path string, v interface{}) error
- func ReadLines(file string) (lines []string, err error)
- func ReadLinesWithFilter(file string, handle func(line string) (matched bool, broken bool)) (lines []string, err error)
- func RemoveWithGlob(path string) (err error)
- func SafePath(path string) string
- func ToLinux(path string) string
- func Unzip(zipFile string, destDir string, filterFn FilterFunc) error
- func Zip(srcFile string, destZip string, filterFn FilterFunc) error
- type ByModTimeAsc
- type ByModTimeDesc
- type FilterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSize ¶
func GetDirSize ¶
func GetModTime ¶
func ReadLinesWithFilter ¶
func RemoveWithGlob ¶
Types ¶
type ByModTimeAsc ¶
func SortByModTimeAsc ¶
func SortByModTimeAsc(fis []os.FileInfo) (sortedFiles ByModTimeAsc)
func (ByModTimeAsc) Len ¶
func (fis ByModTimeAsc) Len() int
func (ByModTimeAsc) Less ¶
func (fis ByModTimeAsc) Less(i, j int) bool
func (ByModTimeAsc) Swap ¶
func (fis ByModTimeAsc) Swap(i, j int)
type ByModTimeDesc ¶
func SortByModTimeDesc ¶
func SortByModTimeDesc(fis []os.FileInfo) (sortedFiles ByModTimeDesc)
func (ByModTimeDesc) Len ¶
func (fis ByModTimeDesc) Len() int
func (ByModTimeDesc) Less ¶
func (fis ByModTimeDesc) Less(i, j int) bool
func (ByModTimeDesc) Swap ¶
func (fis ByModTimeDesc) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.