public function dir_opendir($path, $options) { $this->unwrap(); if (isset($this->context)) { $this->resource = opendir($path, $this->context); } else { $this->resource = opendir($path); } $this->wrap(); return $this->resource !== false; }