Package org.openrewrite
Class PathUtils
java.lang.Object
org.openrewrite.PathUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertNegationToWildcard(String globPattern) static booleanCompare two strings representing file paths, returning true if they indicate the same path regardless of separatorsstatic booleanequalIgnoringSeparators(Path a, Path b) Compare two paths, returning true if they indicate the same path, regardless of separators.getEitherOrPatterns(String globPattern) getExcludedPatterns(String globPattern) static booleanmatchesGlob(@Nullable Path path, @Nullable String globPattern) static StringseparatorsToSystem(String path) static StringseparatorsToUnix(String path) static StringseparatorsToWindows(String path)
-
Method Details
-
equalIgnoringSeparators
Compare two paths, returning true if they indicate the same path, regardless of separators. Does not account for comparison of a relative path to an absolute path, but within the context of OpenRewrite all paths should be relative anyway. "foo/a.txt" is considered to be equal to "foo\a.txt" -
equalIgnoringSeparators
Compare two strings representing file paths, returning true if they indicate the same path regardless of separators -
separatorsToUnix
-
separatorsToWindows
-
separatorsToSystem
-
matchesGlob
-
convertNegationToWildcard
-
getExcludedPatterns
-
getEitherOrPatterns
-