NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class OpendirIterator

Provides an iterator around an opendir resource. This is useful when you need to provide context to an opendir so you can't use RecursiveDirectoryIterator

  Aws\S3\Iterator\OpendirIterator implements Iterator

Namespace: Aws\S3\Iterator
Located at Aws/S3/Iterator/OpendirIterator.php

## Methods summary

- `public` `__construct ( resource $dirHandle, string $filePrefix = '' )`
- `public` `__destruct ( )`
- `public` `rewind ( )`
- `public` `current ( )`
- `public` `next ( )`
- `public` `key ( )`
- `public` `valid ( )`

## Methods detail

# `public`
`__construct( resource $dirHandle, string $filePrefix = '' )`

#### Parameters

$dirHandle
  `resource`
  $dirHandle Opened directory handled returned from opendir
$filePrefix
  `string`
  $filePrefix Prefix to add to each filename

# `public`
`__destruct( )`
# `public`
`rewind( )`

#### Implementation of

`Iterator::rewind()`
# `public`
`current( )`

#### Implementation of

`Iterator::current()`
# `public`
`next( )`

#### Implementation of

`Iterator::next()`
# `public`
`key( )`

#### Implementation of

`Iterator::key()`
# `public`
`valid( )`

#### Implementation of

`Iterator::valid()`

### Magic methods summary

## Properties summary

`protected resource` | $dirHandle | #
`protected `SplFileInfo`` | $currentFile | #
`protected integer` | $key | #
`protected string` | $filePrefix | #