MCPcopy Create free account
hub / github.com/driangle/taskmd / checkExistence

Function checkExistence

apps/cli/internal/taskcontext/resolve.go:156–165  ·  view source on GitHub ↗

checkExistence stats each file path relative to projectRoot and sets Exists and IsDir.

(files []FileEntry, projectRoot string)

Source from the content-addressed store, hash-verified

154
155// checkExistence stats each file path relative to projectRoot and sets Exists and IsDir.
156func checkExistence(files []FileEntry, projectRoot string) {
157 for i := range files {
158 fullPath := filepath.Join(projectRoot, files[i].Path)
159 info, err := os.Stat(fullPath)
160 files[i].Exists = err == nil
161 if err == nil {
162 files[i].IsDir = info.IsDir()
163 }
164 }
165}
166
167// expandDirectories replaces directory entries with their individual files recursively.
168// It skips known junk directories and gitignored files.

Callers 1

ResolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected