public function dir_opendir($path, $options) {
    if (!CloudStorageTools::parseFilename($path, $bucket, $object)) {
      trigger_error(sprintf("Invalid Google Cloud Storage path: %s", $path),
                    E_USER_ERROR);
      return false;
    }

    // Assume opening root directory if no object name is specified in path.
    if (!isset($object)) {
      $object = "/";
    }

    $this->client = new CloudStorageDirectoryClient($bucket,
                                                    $object,
                                                    $this->context);
    return $this->client->initialise();
  }