ezfile

package module
v0.0.0-...-e9a5494 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 8 Imported by: 0

README

ezfile

A file operate library based on golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(file *os.File)

Close close file handle.

func GetAllFile

func GetAllFile(path string) error

GetAllFile get all file list in this path.

func IsExist

func IsExist(path string) (os.FileInfo, error)

IsExist check is file or path exist, and return file info.

func ParseZipInMemory

func ParseZipInMemory(parent string, file string) (*zip.Reader, error)

func ReadAll

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

ReadAll read file all content.

func ReadBlock

func ReadBlock(fd *os.File, offset int64, size int) ([]byte, int, bool, error)

ReadBlock read file with line.

func ReadLine

func ReadLine(fd *os.File) ([]byte, bool, error)

ReadLine read file with line.

func UnZip

func UnZip(srcFileFullPath string, dstParent string) (err error)

func WriteAppendToTail

func WriteAppendToTail(path string, data []byte) error

WriteAppendToTail Appends writing to the end of the file.

func WriteCoverAll

func WriteCoverAll(path string, data []byte) error

WriteCoverAll Delete all the contents of the file and write from the beginning again.

func WriteCoverFromHead

func WriteCoverFromHead(path string, data []byte) error

WriteCoverFromHead From the beginning of the file, write over.

func Zip

func Zip(dstParent string, dstFile string, srcParent string, srcFile string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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