FilesystemIterator::next
FilesystemIterator::setFlags
FilesystemIterator
PHP Manual

# FilesystemIterator::rewind

(PHP 5 >= 5.3.0)

FilesystemIterator::rewind — Rewinds back to the beginning

### 설명

public void FilesystemIterator::rewind ( void )

Rewinds the directory back to the start.

### 인수

이 함수는 인수가 없습니다.

### 반환값

값을 반환하지 않습니다.

### 예제

Example #1 FilesystemIterator::rewind example

`<?php
$iterator = new FilesystemIterator(dirname(__FILE__), FilesystemIterator::KEY_AS_FILENAME);
echo $iterator->key() . "\n";
$iterator->next();
echo $iterator->key() . "\n";
$iterator->rewind();
echo $iterator->key() . "\n";
?>`

위 예제의 출력 예시:

    apple.jpg
    banana.jpg
    apple.jpg

### 참고

- DirectoryIterator::rewind - Rewind the DirectoryIterator back to the start

FilesystemIterator::next
FilesystemIterator::setFlags
FilesystemIterator
PHP Manual