Documentation
¶
Index ¶
- Constants
- func Copy(src, dst string) (int64, error)
- func FindFilesByPrefix(dirPath, prefix string) (files []string, err error)
- func GetFileType(f *os.File) (fileType string, err error)
- func GetFileTypeByFileBytes(data []byte) (fileType string)
- func MakeDirAll(dir string, perm os.FileMode) error
- func MakeHashDir(key string) (hashDir string)
- func RemoveAll(fileNames []string) error
- func Split(filepath string) (dir, file, ext string)
Constants ¶
View Source
const ( JPEG = "jpeg" JPG = "jpg" PNG = "png" GIF = "gif" TIF = "tif" BMP = "bmp" XLS = "xls" XLSX = "xlsx" GO = "golang" )
Variables ¶
This section is empty.
Functions ¶
func FindFilesByPrefix ¶
func GetFileType ¶
GetFileType get the file type by the top several bytes
func GetFileTypeByFileBytes ¶
判断文件的类型 data: 文件流前十字节, 未找到类型fileType == ""
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.