Moves the file to a new location.
@api
string $directory The destination folder:
string $name The new file name:
File A File object representing the new file
FileException if the file has not been uploaded via Http
Overrides File::move
public function move($directory, $name = null) {
if ($this
->isValid() && ($this->test || is_uploaded_file($this
->getPathname()))) {
return parent::move($directory, $name);
}
throw new FileException(sprintf('The file "%s" has not been uploaded via Http', $this
->getPathname()));
}