Documentation
¶
Index ¶
- func CheckFileExist(fileName string) bool
- func CreateFile(fileName string)
- func GetFileInfo(fileName string) (os.FileInfo, error)
- func ReadFile(fileName string) string
- func ReadFileByChunks(fileName string, size int) string
- func ReadFileByLine(fileName string, delim byte) string
- func RemoveFile(fileName string)
- func WriteFile(fileName string, data []byte) error
- func WriteFileWithAppend(fileName string, data string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileExist ¶
CheckFileExist Check file exists or not, if file exist, return true, else return false.
func GetFileInfo ¶
GetFileInfo Get file infos like Name, Size, Mode...
func ReadFileByChunks ¶
ReadFileByChunks Read file with given size.
func ReadFileByLine ¶
ReadFileByLine Read file line by line.
func WriteFileWithAppend ¶
WriteFileWithAppend Write data to file with a given fileName If file exists, append data If not, create a new file and write data to the file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.