move_dir


move_dir ( $from, $to, $overwrite = false )

Parameters:
  • (string) from Source directory.
  • (string) to Destination directory.
  • (bool) overwrite Optional. Whether to overwrite the destination directory if it exists. Default false.
Returns:
  • (true|WP_Error) True on success, WP_Error on failure.
Defined at:

Description

Moves a directory from one location to another.Recursively invalidates OPcache on success. If the renaming failed, falls back to copy_dir(). Assumes that WP_Filesystem() has already been called and setup. This function is not designed to merge directories, copy_dir() should be used instead.

Related Functions

remove_filter, copy_dir, remove_role, remove_action, remove_editor_styles

Top Google Results

User discussions

wpseek mobile