deprecated.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package fileutils
  2. import "github.com/moby/patternmatcher"
  3. type (
  4. // PatternMatcher allows checking paths against a list of patterns.
  5. //
  6. // Deprecated: use github.com/moby/patternmatcher.PatternMatcher
  7. PatternMatcher = patternmatcher.PatternMatcher
  8. // MatchInfo tracks information about parent dir matches while traversing a
  9. // filesystem.
  10. //
  11. // Deprecated: use github.com/moby/patternmatcher.MatchInfo
  12. MatchInfo = patternmatcher.MatchInfo
  13. // Pattern defines a single regexp used to filter file paths.
  14. //
  15. // Deprecated: use github.com/moby/patternmatcher.Pattern
  16. Pattern = patternmatcher.Pattern
  17. )
  18. var (
  19. // NewPatternMatcher creates a new matcher object for specific patterns that can
  20. // be used later to match against patterns against paths
  21. //
  22. // Deprecated: use github.com/moby/patternmatcher.New
  23. NewPatternMatcher = patternmatcher.New
  24. // Matches returns true if file matches any of the patterns
  25. // and isn't excluded by any of the subsequent patterns.
  26. //
  27. // This implementation is buggy (it only checks a single parent dir against the
  28. // pattern) and will be removed soon. Use MatchesOrParentMatches instead.
  29. //
  30. // Deprecated: use github.com/moby/patternmatcher.Matches
  31. Matches = patternmatcher.Matches
  32. // MatchesOrParentMatches returns true if file matches any of the patterns
  33. // and isn't excluded by any of the subsequent patterns.
  34. //
  35. // Deprecated: use github.com/moby/patternmatcher.MatchesOrParentMatches
  36. MatchesOrParentMatches = patternmatcher.MatchesOrParentMatches
  37. )