Filesystem::rename()

rename(string $origin, string $target, bool $overwrite = false)

Renames a file or a directory.

Parameters

string $origin The origin filename or directory
string $target The new filename or directory
bool $overwrite Whether to overwrite the target if it already exists

Exceptions

IOException When target file or directory already exists
IOException When origin cannot be renamed
doc_Symfony
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.