final boolean isRootDirectory() {
    // only root directories have their parent link pointing to themselves
    return isDirectory() && equals(((Directory) this).parent());
  }
Returns whether or not this file is a root directory of the file system.
jimfs/src/main/java/com/google/common/jimfs/File.java