public Path getParent() {
        if(this.isRoot()) {
            return this;
        }
        return parent;
    }
@Test
    public void testGetParent() {
        assertEquals(new Path("/b/t", EnumSet.of(Path.Type.directory)), new Path("/b/t/f.type", EnumSet.of(Path.Type.file)).getParent());
    }