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

File::moveFile

Move (rename) a file

Description​

public void File::moveFile( string $from, string $to )

Moves $from to $to with rename(). Nothing happens when $from does not exist.

Arguments​

NameData typeDefaultRemarks
$fromstringSource file
$tostringDestination file

Example​

Controller
use Fegg\Tool\File;

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