question: private File calcParentTree ( ) { File parentTree = treeFile . getParentFile ( ) ; if ( null == parentTree ) { return null ; } if ( treeFile . isAbsolute ( ) && ( null == parentTree . getParentFile ( ) ) ) { return null ; } return parentTree ; }
target:  Determine if the current tree has a non-root parent.  The trick is the non-root part, as the Java library happily provides the root as a parent. But that leads to unanchored file names, which are not very useful.