Oihana PHP

tarCopyMovedLine.php

Table of Contents

Functions

tarCopyMovedLine()  : string
Writes the sentence that names the files tar saw move while it copied them.

Functions

tarCopyMovedLine()

Writes the sentence that names the files tar saw move while it copied them.

tarCopyMovedLine(array<string|int, string> $moved, string $what[, int|null $limit = null ]) : string

The moved list of tarCopyOutcome(), put in words for a terminal, a log or a mail. A terminal can take every file; a mail or a report should take a few: a cache folder that keeps changing must not make a message of a thousand lines. So a limit names that many at most, and says how many it left out. The count is always of every file.

Parameters
$moved : array<string|int, string>

The files, as tar named them.

$what : string

What was being copied, e.g. content or the site root.

$limit : int|null = null

How many files to name at most, one at least; null names them all.

Tags
example
use function oihana\files\archive\tar\tarCopyMovedLine;

tarCopyMovedLine( [ 'content/a.log' ] , 'content' ) ;
// '1 file changed while content was copied, and was copied as found: content/a.log'

tarCopyMovedLine( [ 'a' , 'b' , 'c' , 'd' ] , 'content' , 2 ) ;
// '4 files changed while content was copied, and were copied as found: a, b … and 2 more'
author

Marc Alcaraz (ekameleon)

since
1.7.0
Return values
string —

The sentence; an empty string when no file moved.

On this page

Search results