package utils
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
)
//GetAllFileIncludeSubFolder 递归获取某个目录下的所有文件
func GetAllFileIncludeSubFolder(folder string) ([]string, error) {
searchPath := folder
if strings.HasSuffix(folder, "/") {
searchPath = searchPath + "*"
} else {
searchPath = searchPath + "/*"
}
return filepath.Glob(searchPath)
}
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8