public function dir_readdir()
    {
        if ($this->dirHandle === null) {
            return false;
        }
        self::restore();
        $success = readdir($this->dirHandle);
        self::register();
        return $success;
    }