zfile

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 8 Imported by: 0

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, index int64) ([]byte, error)

ReadLine read file with line, index begin from 0.

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 then write from the beginning.

func WriteCoverFromHead

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

WriteCoverFromHead From the beginning of the file, write over.

func WriteNewLineAppendToTail

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

WriteNewLineAppendToTail Appends writing to the end of the file.

func Zip

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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