@Test public void testPathNormalize() { { final Path path = new Path(PathNormalizer.normalize( "/path/to/remove/.."), EnumSet.of(Path.Type.directory)); assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path/to/remove/.././"), EnumSet.of(Path.Type.directory)); assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path/remove/../to/remove/.././"), EnumSet.of(Path.Type.directory)); assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path/to/remove/remove/../../"), EnumSet.of(Path.Type.directory)); assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path/././././to"), EnumSet.of(Path.Type.directory)); assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "./.path/to"), EnumSet.of(Path.Type.directory)); assertEquals("/.path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( ".path/to"), EnumSet.of(Path.Type.directory)); assertEquals("/.path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path/.to"), EnumSet.of(Path.Type.directory)); assertEquals("/path/.to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path assertEquals("/path/to", path.getAbsolute()); } { final Path path = new Path(PathNormalizer.normalize( "/path assertEquals("/path/to", path.getAbsolute()); } }
public static String normalize(final String path) { return normalize(path, true); }
PathNormalizer { public static String normalize(final String path) { return normalize(path, true); } }
PathNormalizer { public static String normalize(final String path) { return normalize(path, true); } private  PathNormalizer(); }
PathNormalizer { public static String normalize(final String path) { return normalize(path, true); } private  PathNormalizer(); static String name(final String path); static String parent(final String absolute, final char delimiter); static String normalize(final String path); static String normalize(final String path, final boolean absolute); static List<Path> normalize(final List<Path> selected); }
PathNormalizer { public static String normalize(final String path) { return normalize(path, true); } private  PathNormalizer(); static String name(final String path); static String parent(final String absolute, final char delimiter); static String normalize(final String path); static String normalize(final String path, final boolean absolute); static List<Path> normalize(final List<Path> selected);  }