File_Iterator
extends FilterIterator
in package
FilterIterator implementation that filters files based on prefix(es) and/or suffix(es). Hidden files and files from hidden directories are also filtered.
Tags
Table of Contents
- PREFIX = 0
- SUFFIX = 1
- $basepath : string
- $exclude : array<string|int, mixed>
- $prefixes : array<string|int, mixed>
- $suffixes : array<string|int, mixed>
- __construct() : mixed
- accept() : bool
- acceptPath() : bool
- acceptPrefix() : bool
- acceptSubString() : bool
- acceptSuffix() : bool
Constants
PREFIX
public
mixed
PREFIX
= ""
SUFFIX
public
mixed
SUFFIX
= 1
Properties
$basepath
protected
string
$basepath
$exclude
protected
array<string|int, mixed>
$exclude
= array()
$prefixes
protected
array<string|int, mixed>
$prefixes
= array()
$suffixes
protected
array<string|int, mixed>
$suffixes
= array()
Methods
__construct()
public
__construct(Iterator $iterator[, array<string|int, mixed> $suffixes = array() ][, array<string|int, mixed> $prefixes = array() ][, array<string|int, mixed> $exclude = array() ][, string $basepath = NULL ]) : mixed
Parameters
- $iterator : Iterator
- $suffixes : array<string|int, mixed> = array()
- $prefixes : array<string|int, mixed> = array()
- $exclude : array<string|int, mixed> = array()
- $basepath : string = NULL
Return values
mixed —accept()
public
accept() : bool
Return values
bool —acceptPath()
protected
acceptPath(string $path) : bool
Parameters
- $path : string
Tags
Return values
bool —acceptPrefix()
protected
acceptPrefix(string $filename) : bool
Parameters
- $filename : string
Tags
Return values
bool —acceptSubString()
protected
acceptSubString(string $filename, array<string|int, mixed> $subStrings, int $type) : bool
Parameters
- $filename : string
- $subStrings : array<string|int, mixed>
- $type : int
Tags
Return values
bool —acceptSuffix()
protected
acceptSuffix(string $filename) : bool
Parameters
- $filename : string