package
1.0.1
Repository: https://github.com/33cn/go-kit.git
Documentation: pkg.go.dev

# Functions

AbsPath returns an absolute representation of file path.
Append appends data to the end of the file by file name with perm, default perm is 0666.
Copy copies src file contents to dest file contents with perm, default perm is 0666.
Deldir deletes file path and any children it contains.
DirSize returns the number of files contained in the dictionary and size in bytes.
Ext returns the lowercase extension of the file name, excluding the dot.
Hash returns the hash string of the file content by file name and hash algorithm.
IsAbsPath reports whether the file path is absolute.
IsDir reports whether the file path describes a dictionary.
IsExist reports whether the file path already exists.
IsFile reports whether the file path describes a file.
MD5 returns the MD5 hash string of the file content by file name.
Mkdir creates a directory by file path with perm, along with any necessary parents, default perm is 0777.
Read reads the file by file name and returns the contents.
ReadToSlice returns the file contents slice separated by row, and excluding the end-of-line bytes.
Remove removes the file or empty directory by file name.
Rename renames (moves) old name to new name.
SHA1 returns the SHA1 hash string of the file content by file name.
SHA256 returns the SHA256 hash string of the file content by file name.
SHA512 returns the SHA512 hash string of the file content by file name.
Size returns the file size in bytes.
Write writes data to the file by file name with perm, default perm is 0666.