code: public Inode getAncestorInode() throws FileDoesNotExistException {
      int ancestorIndex = mPathComponents.length - 2;
      if (ancestorIndex < 0) {
        throw new FileDoesNotExistException(ExceptionMessage.PATH_DOES_NOT_EXIST.getMessage(mUri));
      }
      ancestorIndex = Math.min(ancestorIndex, mExistingInodes.size() - 1);
      return mExistingInodes.get(ancestorIndex);
    }
docs: Returns the closest ancestor of the target inode (last inode in the full path).
  
  @return the closest ancestor inode
  @throws FileDoesNotExistException if an ancestor does not exist