Documentation ¶
Index ¶
- func CheckNotExist(src string) bool
- func CheckPermission(src string) bool
- func ComparisonHash(data []byte, hash string) bool
- func CopyDir(src string, dst string) error
- func CopyFile(src, dst string) error
- func CreateFile(path string) error
- func CreateFileAndWriteContent(path string, content string) error
- func DataLength(length int) []byte
- func Exists(path string) bool
- func GetBlockInfo(fileSize int64) (blockSize int, length int)
- func GetExt(fileName string) string
- func GetHashByContent(data []byte) string
- func GetHashByPath(path string) string
- func GetNoDuplicateFileName(fullPath string) string
- func GetSize(f multipart.File) (int, error)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsNotExistCreateFile(src string) error
- func IsNotExistMkDir(src string) error
- func MkDir(src string) error
- func MustOpen(fileName, filePath string) (*os.File, error)
- func Open(name string, flag int, perm os.FileMode) (*os.File, error)
- func PrefixLength(byteLength int) []byte
- func RMDir(src string) error
- func ReadFullFile(path string) []byte
- func SpliceFiles(dir, path string, length int, startPoint int) error
- func WriteToPath(data []byte, path, name string) error
- type ReadLineFromEnd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermission ¶
CheckPermission check if the file has permission
func ComparisonHash ¶ added in v0.2.10
Comparison data hash
func CreateFile ¶
func CreateFileAndWriteContent ¶ added in v0.2.10
func GetBlockInfo ¶ added in v0.2.10
Get info of block
func GetHashByContent ¶ added in v0.2.10
get the hash of the data
func GetHashByPath ¶ added in v0.2.10
get the hash of the data
func GetNoDuplicateFileName ¶ added in v0.3.0
Check for duplicate file names
func IsNotExistCreateFile ¶
IsNotExistMkDir create a directory if it does not exist
func IsNotExistMkDir ¶
IsNotExistMkDir create a directory if it does not exist
func PrefixLength ¶ added in v0.2.10
get prefix byte length
func ReadFullFile ¶
func SpliceFiles ¶ added in v0.2.10
最终拼接
Types ¶
type ReadLineFromEnd ¶
type ReadLineFromEnd struct {
// contains filtered or unexported fields
}
ReadLineFromEnd --
func NewReadLineFromEnd ¶
func NewReadLineFromEnd(name string) (rd *ReadLineFromEnd, err error)
NewReadLineFromEnd --
func (*ReadLineFromEnd) ReadLine ¶
func (c *ReadLineFromEnd) ReadLine() (line []byte, err error)
ReadLine 结尾包含'\n'
Click to show internal directories.
Click to hide internal directories.