summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-11 14:13:23 -0500
committerJeff Carr <[email protected]>2025-10-11 15:17:29 -0500
commit75c9e564d93f2c482434502bc2eea7bd39a32fb0 (patch)
treee208aeef351bf2e058fb266e2830fe2d7cf9164c /find.go
parente176d4cf7fd6693d5cdcdf9e7fc337f9e84f6249 (diff)
works maybe
Diffstat (limited to 'find.go')
-rw-r--r--find.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/find.go b/find.go
new file mode 100644
index 0000000..31e581c
--- /dev/null
+++ b/find.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "os"
+ "path/filepath"
+)
+
+func FindFiles(lookhere string) ([]string, error) {
+ var allfiles []string
+
+ err := filepath.Walk(lookhere, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ if !info.IsDir() {
+ allfiles = append(allfiles, path)
+ }
+ return nil
+ })
+
+ return allfiles, err
+}