MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / parseNullSeparatedPaths

Function parseNullSeparatedPaths

vcs/git/git_ls_files.go:78–89  ·  view source on GitHub ↗
(stdout []byte)

Source from the content-addressed store, hash-verified

76}
77
78func parseNullSeparatedPaths(stdout []byte) []string {
79 parts := strings.Split(string(stdout), "\x00")
80 paths := make([]string, 0, len(parts))
81 for _, part := range parts {
82 path := strings.TrimSpace(part)
83 if path == "" {
84 continue
85 }
86 paths = append(paths, path)
87 }
88 return paths
89}
90
91// FileExists checks whether a file exists on disk.
92func FileExists(path string) (bool, error) {

Callers 2

ListTrackedFilesFunction · 0.85
ListUntrackedFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected