function PhpStreamWrapperInterface::rename

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface::rename()

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 renaming files.

Note, the streamWrapper::$context property is updated if a valid context is passed to the caller function.

Parameters

string $path_from: The URL to the current file.

string $path_to: The URL which the $path_from should be renamed to.

Return value

bool Returns TRUE on success or FALSE on failure.

See also

rename()

http://php.net/manual/en/streamwrapper.rename.php

File

core/lib/Drupal/Core/StreamWrapper/PhpStreamWrapperInterface.php, line 126

Class

PhpStreamWrapperInterface
Defines a generic PHP stream wrapper interface.

Namespace

Drupal\Core\StreamWrapper

Code

public function rename($path_from, $path_to);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.