master
huanghai 5 years ago
parent e123364e28
commit d81f71b112

@ -28,10 +28,15 @@ func Cut(source string) {
//2、获取文件后缀
extension := path.Ext(source)
//3、输出的文件通配名称
workingPath := runDir + `/Target/` + source[0:32] + "/"
workingPath := runDir + `/Working/` + source[0:2] + "/"
if !FileUtil.Exists(workingPath) {
os.Mkdir(workingPath, os.ModePerm)
}
workingPath = workingPath + source[0:36] + "/"
if !FileUtil.Exists(workingPath) {
os.Mkdir(workingPath, os.ModePerm)
}
targetPath := workingPath + source[0:36] + `_%03d` + extension
//尝试删除已存在的视频
var i = 0
@ -55,7 +60,10 @@ func Cut(source string) {
2020-07-08
*/
func GetAllCutChild(source string) []string {
filepathNames, _ := filepath.Glob(filepath.Join(runDir+`/Target/`+source[0:2]+"/"+source[0:36]+"/", "*"))
filepathNames, err := filepath.Glob(filepath.Join(runDir+`/Working/`+source[0:2]+"/"+source[0:36]+"/", "*"))
if err!=nil{
fmt.Println(err.Error())
}
return filepathNames
}

Loading…
Cancel
Save