Checks whether the current element has children.
public function hasChildren() : bool { return $this->nodes[$this->position] instanceof Directory; }