[agent-operator] - update dltu part

This commit is contained in:
zeaslity
2024-04-26 17:51:11 +08:00
parent 318a5a8026
commit 021690f5c4
12 changed files with 338 additions and 197 deletions

View File

@@ -120,6 +120,15 @@ func WordSpaceCompletion(source string, totalLength int) string {
return source
}
// IsFileOrDir 如果是目录则返回true是文件则返回false
func IsFileOrDir(path string) bool {
info, err := os.Stat(path)
if err != nil {
return false
}
return info.IsDir()
}
// FileExists 文件存在返回true不存在返回false如果文件是一个目录也返回false
func FileExists(fileFullPath string) bool {
_, err := os.Stat(fileFullPath)