public class PathNormalizer extends Object
File.getCanonicalFile()
calls, the normalizer is aware of
the build base directory. Normalized paths under the base directory may contain '../' and './'
special directories by default.Constructor and Description |
---|
PathNormalizer(Path basedir) |
Modifier and Type | Method and Description |
---|---|
String |
getBasedir() |
String |
normalize(Path file)
File path normalization implementation optimized for use with
PathMatcher . |
String |
normalize(String file)
File path normalization implementation optimized for use with
PathMatcher . |
static String |
normalize0(Path file)
Returns canonical file path with '/' separator char on all platforms.
|
static String |
normalize0(String file) |
public PathNormalizer(Path basedir)
public String getBasedir()
public String normalize(String file)
PathMatcher
.
Normalized path may include '../' and './' special directory names, which are resolved by
PathMatcher
.public String normalize(Path file)
PathMatcher
.
Normalized path may include '../' and './' special directory names, which are resolved by
PathMatcher
.public static String normalize0(Path file)
Copyright © 2017. All rights reserved.