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().
Parameters
$sourcestring
Path to the source file or directory.
$destinationstring
Path to the destination file or directory.
$overwritebooloptional
Whether to overwrite the destination if it exists. Default false.Default: false
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-admin/includes/class-wp-filesystem-ftpext.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.