Method
UploadedFile::moveTo
Moves the file to $targetPath, once.
Description#
public UploadedFile::moveTo(
$targetPath
): voidA file path is moved with move_uploaded_file(), or with rename() in the CLI or with $isUploadedFile. A stream is
copied to $targetPath. Either way an existing file at $targetPath is replaced.
Parameters#
- $targetPath
Errors / Exceptions#
| Exception | When |
|---|---|
RuntimeException | For a second call, an upload that failed (getError()), or a target that cannot be written |