MCPcopy Index your code
hub / github.com/devspace-sh/devspace / populateFileMap

Method populateFileMap

pkg/devspace/sync/downstream.go:80–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80func (d *downstream) populateFileMap() error {
81 d.sync.fileIndex.fileMapMutex.Lock()
82 defer d.sync.fileIndex.fileMapMutex.Unlock()
83
84 changes, err := d.collectChanges(true)
85 if err != nil {
86 return errors.Wrap(err, "collect changes")
87 }
88
89 for _, element := range changes {
90 if d.sync.fileIndex.fileMap[element.Path] == nil {
91 d.sync.fileIndex.fileMap[element.Path] = parseFileInformation(element)
92 }
93 }
94
95 return nil
96}
97
98func (d *downstream) collectChanges(skipIgnore bool) ([]*remote.Change, error) {
99 d.sync.log.Debugf("Downstream - Start collecting changes")

Callers 1

initialSyncMethod · 0.80

Calls 4

collectChangesMethod · 0.95
parseFileInformationFunction · 0.85
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected