WP_Filesystem_FTPext::move() – Moves a file.

You appear to be a bot. Output may be restricted

Description

Moves a file or directory.

After moving files or directories, OPcache will need to be invalidated. If moving a directory fails, copy_dir() can be used for a recursive copy. Use move_dir() for moving directories with OPcache invalidation and a fallback to `copy_dir()`.

Usage

$bool = WP_Filesystem_FTPext::move( $source, $destination, $overwrite );

Parameters

$source
( string ) required – Path to the source file or directory.
$destination
( string ) required – Path to the destination file or directory.
$overwrite
( bool ) optional – Optional. Whether to overwrite the destination if it exists. Default false.

Returns

bool True on success, false on failure.

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
Lines:

1 to 3 of 3
  public function move( $source, $destination, $overwrite = false ) {
    return ftp_rename( $this->link, $source, $destination );
  }
 

 View on GitHub View on Trac