Filesystem iterator

package filicious-core
author Christian Schiffler
author Tristan Lins
author Oliver Hoff

 Methods

__construct()

__construct(\Filicious\File $path, int|string|callable $_) 

Parameters

$_

intstringcallable

List of flags, bitmask filters File::LIST_*, glob patterns or callables function($file) { return true|false; }

(PHP 5 &gt;= 5.0.0)<br/> Return the current element

current() : mixed

(PHP 5 &gt;= 5.0.0)<br/> Return the key of the current element

key() : int
link http://php.net/manual/en/iterator.key.php

Returns

intscalar on success, or null on failure.

(PHP 5 &gt;= 5.1.0)<br/> Seeks to a position

seek(int $position) : void
link http://php.net/manual/en/seekableiterator.seek.php

Parameters

$position

int

The position to seek to.

 Properties

 

$flags

$flags : int

 Constants

 

Makes FilesystemIterator::current() return the filename.

CURRENT_AS_BASENAME 
 

Makes FilesystemIterator::current() return an File instance.

CURRENT_AS_FILE 
 

Makes FilesystemIterator::current() return the pathname.

CURRENT_AS_PATHNAME 
 

Makes FilesystemIterator::current() return $this (the FilesystemIterator).

CURRENT_AS_SELF 
 

Makes FilesystemIterator::key() return the filename.

KEY_AS_FILENAME 
 

Makes FilesystemIterator::key() return the pathname.

KEY_AS_PATHNAME