file_utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 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 FileCount

func FileCount(dirname string) (int, error)

func FormatFileSize

func FormatFileSize(fileSize int64) (size string)

func ListFileNames

func ListFileNames(dirname string) ([]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