function file_unmanaged_move

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
cle7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
elmsmedia7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
icor7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
meedjum_blog7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)
mooc7 file.inc file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME)

Moves a file to a new location without database changes or hook invocation.

Parameters

$source: A string specifying the filepath or URI of the original file.

$destination: A string containing the destination that $source should be moved to. This must be a stream wrapper URI. If this value is omitted, Drupal's default files scheme will be used, usually "public://".

$replace: Replace behavior when the destination file already exists:

Return value

The URI of the moved file, or FALSE in the event of an error.

See also

file_move()

Related topics

17 calls to file_unmanaged_move()
backup_migrate_destination_files::_save_file in sites/all/modules/ulmus/backup_migrate/includes/destinations.file.inc
File save destination callback.
BaconmockupProvider::generateImage in sites/all/modules/ulmus/devel_image_provider/plugins/devel_image_provider/provider/BaconmockupProvider.class.php
Image generation handler.
ctools_stylizer_image_processor::command_slice in sites/all/modules/ulmus/ctools/includes/stylizer.inc
Take a slice out of the current workspace and save it as an image.
devel_generate_image in sites/all/modules/ulmus/devel/devel_generate/image.devel_generate.inc
Private function for creating a random image.
devel_generate_textfile in sites/all/modules/ulmus/devel/devel_generate/file.devel_generate.inc
Private function for generating a random text file.

... See full list

File

includes/file.inc, line 1103
API for handling file uploads and server file management.

Code

function file_unmanaged_move($source, $destination = NULL, $replace = FILE_EXISTS_RENAME) {
  $filepath = file_unmanaged_copy($source, $destination, $replace);
  if ($filepath == FALSE || file_unmanaged_delete($source) == FALSE) {
    return FALSE;
  }
  return $filepath;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.