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

Function shouldRemoveRemote

pkg/devspace/sync/evaluater.go:10–36  ·  view source on GitHub ↗

s.fileIndex needs to be locked before this function is called

(relativePath string, s *Sync)

Source from the content-addressed store, hash-verified

8
9// s.fileIndex needs to be locked before this function is called
10func shouldRemoveRemote(relativePath string, s *Sync) bool {
11 // File / Folder was already deleted from map so event was already processed or should not be processed
12 if s.fileIndex.fileMap[relativePath] == nil {
13 return false
14 }
15
16 // Exclude symbolic links
17 if s.fileIndex.fileMap[relativePath].IsSymbolicLink {
18 return false
19 }
20
21 // Exclude changes on the exclude list
22 if s.ignoreMatcher != nil {
23 if s.ignoreMatcher.Matches(relativePath, s.fileIndex.fileMap[relativePath].IsDirectory) {
24 return false
25 }
26 }
27
28 // Exclude changes on the upload exclude list
29 if s.uploadIgnoreMatcher != nil {
30 if s.ignoreMatcher.Matches(relativePath, s.fileIndex.fileMap[relativePath].IsDirectory) {
31 return false
32 }
33 }
34
35 return true
36}
37
38// s.fileIndex needs to be locked before this function is called
39func shouldUpload(s *Sync, fileInformation *FileInformation, log log.Logger) bool {

Callers 1

evaluateChangeMethod · 0.85

Calls 1

MatchesMethod · 0.65

Tested by

no test coverage detected