MCPcopy Create free account
hub / github.com/Facets-cloud/flow / listUpdateFiles

Function listUpdateFiles

internal/app/show.go:591–608  ·  view source on GitHub ↗

listUpdateFiles returns absolute paths to all *.md files under dir, sorted ascending. Missing dir yields an empty slice, not an error.

(dir string)

Source from the content-addressed store, hash-verified

589// listUpdateFiles returns absolute paths to all *.md files under dir,
590// sorted ascending. Missing dir yields an empty slice, not an error.
591func listUpdateFiles(dir string) []string {
592 entries, err := os.ReadDir(dir)
593 if err != nil {
594 return nil
595 }
596 var paths []string
597 for _, e := range entries {
598 if e.IsDir() {
599 continue
600 }
601 if filepath.Ext(e.Name()) != ".md" {
602 continue
603 }
604 paths = append(paths, filepath.Join(dir, e.Name()))
605 }
606 sort.Strings(paths)
607 return paths
608}
609
610// staleDaysThreshold returns the staleness threshold in days. Reads
611// FLOW_STALE_DAYS env var; defaults to 3.

Callers 3

printTaskMetadataFunction · 0.85
printProjectMetadataFunction · 0.85
printPlaybookMetadataFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected