file_utils

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(dst, src string) error

func CopyFileIntoDir

func CopyFileIntoDir(src string, dir string) error

func CopyFileIntoDirOrFatal

func CopyFileIntoDirOrFatal(src string, dir string) error

func CountDirFiles added in v0.0.3

func CountDirFiles(dirName string) (int, error)

func FileCount

func FileCount(dirname string) (int, error)

FileCount 这个会递归的调用

func FormatFileSize

func FormatFileSize(fileSize int64) (size string)

func IsDir added in v0.0.3

func IsDir(path string) bool

func IsFile added in v0.0.3

func IsFile(filePath string) bool
func IsSymlink(mode os.FileMode) bool

func ListFileNames

func ListFileNames(dirname string) ([]string, error)

func MkDirs added in v0.0.3

func MkDirs(dirs ...string) error

func NewLazyWriter

func NewLazyWriter(name string) io.WriteCloser

func TaskConsume

func TaskConsume(i interface{})

Types

type FileTask

type FileTask struct {
	Name  string
	Path  string
	IsDir bool
	// contains filtered or unexported fields
}

type LazyWriter

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

func (*LazyWriter) Close

func (l *LazyWriter) Close() error

func (*LazyWriter) Write

func (l *LazyWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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