dir_opendir ( $path, $options )

Open directory handle. This method is called in response to opendir().

Access

public

Parameters

Parameter

Type

Required

Description

$path

string

Required

Specifies the URL that was passed to opendir().

$options

integer

Required

Not used. Passed in by opendir().

Returns

Type

Description

boolean

Returns true on success or false on failure.

Source

Method defined in extensions/s3streamwrapper.class.php | Toggle source view (13 lines) | View on GitHub

public function dir_opendir($path, $options)
{
    $this->path = $path;
    list($protocol, $bucket, $object_name) = $this->parse_path($path);

    $pattern = '/^' . self::regex_token($object_name) . '(.*)[^\/$]/';

    $this->file_list = $this->client($protocol)->get_object_list($bucket, array(
        'pcre' => $pattern
    ));

    return (count($this->file_list)) ? true : false;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback