Documentation ¶ Index ¶ func Detect(src []byte) (*mimetype.MIME, error) func DetectFile(filePath string) (*mimetype.MIME, error) func DetectReader(r io.Reader) (*mimetype.MIME, error) func Exists(path string) bool func GetSystemTmp() string func IsDir(path string) bool func IsFile(path string) bool Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Detect ¶ func Detect(src []byte) (*mimetype.MIME, error) func DetectFile ¶ func DetectFile(filePath string) (*mimetype.MIME, error) func DetectReader ¶ func DetectReader(r io.Reader) (*mimetype.MIME, error) func Exists ¶ func Exists(path string) bool 判断给定的路径文件/文件夹是否存在 func GetSystemTmp ¶ func GetSystemTmp() string GetSystemTmp func IsDir ¶ func IsDir(path string) bool 判断所给路径是否为文件夹 如果不存在,也是 false func IsFile ¶ func IsFile(path string) bool 判断所给路径是否为文件 同样使用 IsDir 如果不存在的也是 false, 因为这个地方只设计了一个返回值 Types ¶ This section is empty. Source Files ¶ View all Source files file.go mimetype.go Click to show internal directories. Click to hide internal directories.