MCPcopy Create free account
hub / github.com/JordanCoin/codemap / ConnectedFiles

Method ConnectedFiles

scanner/filegraph.go:362–379  ·  view source on GitHub ↗

ConnectedFiles returns all files connected to the given file (imports + importers)

(path string)

Source from the content-addressed store, hash-verified

360
361// ConnectedFiles returns all files connected to the given file (imports + importers)
362func (fg *FileGraph) ConnectedFiles(path string) []string {
363 seen := make(map[string]bool)
364
365 for _, f := range fg.Imports[path] {
366 seen[f] = true
367 }
368 for _, f := range fg.Importers[path] {
369 seen[f] = true
370 }
371
372 var result []string
373 for f := range seen {
374 if f != path {
375 result = append(result, f)
376 }
377 }
378 return result
379}
380
381// tsConfig represents the structure of tsconfig.json we care about
382type tsConfig struct {

Callers 4

handleGetFileContextFunction · 0.80
findRelatedHotMethod · 0.80

Calls

no outgoing calls