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
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $source | string | Source file | |
| $dest | string | Destination file |
Example
Controller
use Fegg\Tool\File;
$file = new File();
$file->copyFile('path/to/foo.txt', 'path/to/bar.txt');