Documentation

RecursiveCopy
in package

Recursive copy handler

This wants to be factored out.

Table of Contents

$filter  : array<string|int, mixed>
$sourceDir  : string
$targetDir  : string
__construct()  : mixed
Create a recursive copy operation pending execution
copy()  : void
Run a recursive copy
copyLevel()  : void
Internal recursion function for copy()

Properties

$filter

private array<string|int, mixed> $filter = ['.', '..']

Methods

__construct()

Create a recursive copy operation pending execution

public __construct(string $sourceDir, string $targetDir[, array<string|int, string> $filter = [] ]) : mixed
Parameters
$sourceDir : string

Where to copy from

$targetDir : string

Where to copy to

$filter : array<string|int, string> = []

Files or dirs to ignore, including subdir content.

Return values
mixed

copy()

Run a recursive copy

public copy() : void
Return values
void

copyLevel()

Internal recursion function for copy()

private copyLevel(string $sourceDir, string $targetDir, array<string|int, string> $filter) : void
Parameters
$sourceDir : string

Where to copy from

$targetDir : string

Where to copy to

$filter : array<string|int, string>

Files or dirs to ignore, including subdir content.

Return values
void

Search results