# Functions
ChunkRead reads a block from the file at the specified offset and returns all lines within the block Play: https://go.dev/play/p/r0hPmKWhsgf.
ClearFile write empty string to path file.
CopyDir copy src directory to dst directory, it will copy all files and directories recursively.
CopyFile copy src file to dest file.
CreateDir create directory in absolute path.
CreateFile create a file in path.
CurrentPath return current absolute path.
DirSize walks the folder recursively and returns folder size in bytes.
FileMode return file's mode and permission.
FileSize returns file size in bytes.
IsDir checks if the path is directory or not.
IsExist checks if a file or directory exists.
IsLink checks if a file is symbol link or not.
IsZipFile checks if file is zip or not.
ListFileNames return all file names in the path.
MiMeType return file mime type param `file` should be string(file path) or *os.File.
MTime returns file modified time.
NewFileReader creates the FileReader struct for reading.
ParallelChunkRead reads the file in parallel and send each chunk of lines to the specified channel.
ReadCsvFile read file content into slice.
ReadFile get file reader by a url or a local file Play: https://go.dev/play/p/uNep3Tr8fqF.
ReadFileByLine read file line by line.
ReadFileToString return string of file content.
RemoveFile remove the path file.
Sha returns file sha value, param `shaType` should be 1, 256 or 512.
UnZip unzip the file and save it to destPath.
WriteBytesToFile write bytes to target file.
WriteCsvFile write content to target csv file.
WriteMapsToCsv write slice of map to csv file.
WriteStringToFile write string to target file.
Zip create zip file, fpath could be a single file or a directory.
ZipAppendEntry append a single file or directory by fpath to an existing zip file.
# Structs
FileReader is a reader supporting offset seeking and reading one line at a time, this is especially useful for large files.