Add StringTitle

This commit is contained in:
George Suntres
2026-03-30 18:29:58 -04:00
parent 65eec3c3b1
commit d829099a45
9 changed files with 73 additions and 0 deletions

25
file.go Normal file
View File

@@ -0,0 +1,25 @@
package commons
import (
"log"
"os"
"path/filepath"
)
// FileDeepScan will scan dir recursively and append any files found to files.
func FileDeepScan(dir string, files *[]string) {
entries, err := os.ReadDir(dir)
if err != nil {
log.Printf("Failed to read %v", err)
return
}
for _, entry := range entries {
fullPath := filepath.Join(dir, entry.Name())
if entry.IsDir() {
FileDeepScan(fullPath, files)
} else {
*files = append(*files, filepath.Join(dir, entry.Name()))
}
}
}