class FolderPath {

    public void setName(String newName) {
        if (!isRoot()) {
            path[path.length - 1] = newName;
        }
    }

    public  FolderPath(String... path);
    public  FolderPath(FolderPath parent, String... path);

}