refactor: prepare the ground for watch command

This commit is contained in:
Antoine Aflalo
2024-08-27 14:19:07 -04:00
parent c6a8caf317
commit 7104121fcf
7 changed files with 49 additions and 20 deletions

12
utils/file_utils.go Normal file
View File

@@ -0,0 +1,12 @@
package utils
import "os"
// IsValidFolder checks if the provided path is a valid directory
func IsValidFolder(path string) bool {
info, err := os.Stat(path)
if err != nil {
return false
}
return info.IsDir()
}