downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

FilesystemIterator::setFlags> <FilesystemIterator::next
[edit] Last updated: Fri, 25 May 2012

view this page in

FilesystemIterator::rewind

(PHP 5 >= 5.3.0)

FilesystemIterator::rewind先頭に巻き戻す

説明

public void FilesystemIterator::rewind ( void )

ディレクトリを先頭に巻き戻します。

パラメータ

この関数にはパラメータはありません。

返り値

値を返しません。

例1 FilesystemIterator::rewind() の例

<?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

参考



add a note add a note User Contributed Notes FilesystemIterator::rewind
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites