@Override
    public Path.Type detect(final String path) {
        if(StringUtils.isBlank(path)) {
            return Path.Type.directory;
        }
        if(path.endsWith(String.valueOf(Path.DELIMITER))) {
            return Path.Type.directory;
        }
        if(StringUtils.isBlank(Path.getExtension(path))) {
            return Path.Type.directory;
        }
        return Path.Type.file;
    }
@Test
    public void testDetect() {
        DefaultPathKindDetector d = new DefaultPathKindDetector();
        assertEquals(Path.Type.directory, d.detect(null));
        assertEquals(Path.Type.directory, d.detect("/"));
        assertEquals(Path.Type.directory, d.detect("/a"));
        assertEquals(Path.Type.directory, d.detect("/a/"));
        assertEquals(Path.Type.file, d.detect("/a/b.z"));
        assertEquals(Path.Type.file, d.detect("/a/b.zip"));
    }