code: public function dir_closedir()
      {
          if (!$this->handle) {
              return false;
          }
          self::restorePrev();
          \closedir($this->handle);
          self::register();
          $this->handle = null;
          return true;
      }
docs: Close the directory
  
  @return boolean
  
  @see http://php.net/manual/en/streamwrapper.dir-closedir.php