メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

File::copyFile

Copy a file

Description​

public void File::copyFile( string $source, string $dest )

Copies $source to $dest and sets the permission of the copy to 0666. Nothing happens when $source does not exist.

Arguments​

NameData typeDefaultRemarks
$sourcestringSource file
$deststringDestination file

Example​

Controller
use Fegg\Tool\File;

$file = new File();
$file->copyFile('path/to/foo.txt', 'path/to/bar.txt');