Neos\Flow\ResourceManagement\Streams\StreamWrapperInterface::rename PHP Method

rename() public method

This method is called in response to rename(). Should attempt to rename path_from to path_to.
public rename ( string $source, string $target ) : boolean
$source string The URL to the current file.
$target string The URL which the path_from should be renamed to.
return boolean TRUE on success or FALSE on failure.
    public function rename($source, $target);

Usage Example

 /**
  * Renames a file or directory.
  *
  * This method is called in response to rename().
  *
  * Should attempt to rename path_from to path_to.
  *
  * Note: In order for the appropriate error message to be returned this
  * method should not be defined if the wrapper does not support creating
  * directories.
  *
  * @param string $path_from The URL to the current file.
  * @param string $path_to The URL which the path_from should be renamed to.
  * @return boolean TRUE on success or FALSE on failure.
  */
 public function rename($path_from, $path_to)
 {
     $this->createStreamWrapper($path_from);
     return $this->streamWrapper->rename($path_from, $path_to);
 }