(df FileSearchInfo, option FileOption)
| 437 | } |
| 438 | |
| 439 | func 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 | |
| 455 | func (f *FileInfo) getFilePathAndName(option FileOption, df FileSearchInfo) (string, string) { |
| 456 | name := df.Name() |
no test coverage detected