MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / shouldSkipFile

Function shouldSkipFile

agent/utils/files/fileinfo.go:439–453  ·  view source on GitHub ↗
(df FileSearchInfo, option FileOption)

Source from the content-addressed store, hash-verified

437}
438
439func shouldSkipFile(df FileSearchInfo, option FileOption) bool {
440 if option.Dir && !df.IsDir() {
441 return true
442 }
443
444 if option.Search != "" && !option.ContainSub {
445 lowerName := strings.ToLower(df.Name())
446 lowerSearch := strings.ToLower(option.Search)
447 if !strings.Contains(lowerName, lowerSearch) {
448 return true
449 }
450 }
451
452 return false
453}
454
455func (f *FileInfo) getFilePathAndName(option FileOption, df FileSearchInfo) (string, string) {
456 name := df.Name()

Callers 1

processFilesMethod · 0.85

Calls 2

IsDirMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected