Package org.openrewrite
Class PathUtils
java.lang.Object
org.openrewrite.PathUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertNegationToWildcard
(String globPattern) static boolean
Compare two strings representing file paths, returning true if they indicate the same path regardless of separatorsstatic boolean
equalIgnoringSeparators
(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 boolean
matchesGlob
(@Nullable Path path, @Nullable String globPattern) static String
separatorsToSystem
(String path) static String
separatorsToUnix
(String path) static String
separatorsToWindows
(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
-