/** * Close down directory stream */ public function close() { if ($this->isOpen()) { closedir($this->getPointer()); parent::close(); } }
/** * Alias for setTimeout * Additionally calls stream_set_timeout * @param integer $timeout * @return integer */ public function setTimeout($timeout) { parent::setTimeout($timeout); if ($this->isOpen()) { stream_set_timeout($this->pointer, $timeout); } return $timeout; }