public static Stream<Path> iterPaths(Path path) {
        Deque<Path> parents = new ArrayDeque<>(path.getNameCount());
        // Push parents to the front of the stack, so the "root" is at the front
        Path next = path;
        while (next != null) {
            parents.addFirst(next);
            next = next.getParent();
        }
        // now just iterate straight over them
        return ImmutableList.copyOf(parents).stream();
    }
@Test
    void testRelative() {
        assertEquals(
            paths("a", "a/b", "a/b/c"),
            MorePaths.iterPaths(Paths.get("a/b/c")).collect(toList())
        );
    }