增加获取文件扩展名的方法
This commit is contained in:
9
file.go
9
file.go
@ -284,3 +284,12 @@ func (f *file) ReadDirFileList(dirPath string, ignoreHiddenFile bool, isRecurve
|
||||
func (f *file) ReadFileListRecurve(rootDir string) ([]*define.FileInfo, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// FileExt 获取文件后缀
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:53 2024/6/18
|
||||
func (f *file) FileExt(filePath string) string {
|
||||
return strings.TrimLeft(filepath.Ext(filePath), ".")
|
||||
}
|
||||
|
Reference in New Issue
Block a user