Home > PHP > Function > SSH2 > ssh2_sftp_rename()

ssh2_sftp_rename()

ssh2_sftp_rename - Rename a remote file

Syntax

bool ssh2_sftp_rename (resource $sftp, string $from, string $to)

Arguments

  • sftp - An SSH2 SFTP resource opened by ssh2_sftp().
  • from - The current file that is being renamed.
  • to - The new file name that replaces from.

Description

Renames a file on the remote filesystem.

Version

PHP PECL ssh2 >= 0.9.0

Return value

Returns TRUE on success or FALSE on failure.