diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-11-20 10:44:02 -0800 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-11-20 10:44:02 -0800 |
commit | 099daac090f69dbc44f8e999a876973a67bf76ba (patch) | |
tree | c05a6a6f8df2dcc7a8b657074324922561a8cdb1 /includes/file.inc | |
parent | 8fbfff25cd51b7e6bcf4543948e95650d05a113e (diff) | |
download | brdo-099daac090f69dbc44f8e999a876973a67bf76ba.tar.gz brdo-099daac090f69dbc44f8e999a876973a67bf76ba.tar.bz2 |
Issue #2084535 by sivaji, mErilainen, tankerjoe, DanielFbrg: Fix docs for file_copy
Diffstat (limited to 'includes/file.inc')
-rw-r--r-- | includes/file.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/file.inc b/includes/file.inc index 44e342233..3ca88e7f3 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -719,10 +719,11 @@ function file_usage_delete(stdClass $file, $module, $type = NULL, $id = NULL, $c * stored in the database. This is a powerful function that in many ways * performs like an advanced version of copy(). * - Checks if $source and $destination are valid and readable/writable. - * - Checks that $source is not equal to $destination; if they are an error - * is reported. * - If file already exists in $destination either the call will error out, * replace the file or rename the file based on the $replace parameter. + * - If the $source and $destination are equal, the behavior depends on the + * $replace parameter. FILE_EXISTS_REPLACE will error out. FILE_EXISTS_RENAME + * will rename the file until the $destination is unique. * - Adds the new file to the files database. If the source file is a * temporary file, the resulting file will also be a temporary file. See * file_save_upload() for details on temporary files. @@ -817,10 +818,11 @@ function file_valid_uri($uri) { * This is a powerful function that in many ways performs like an advanced * version of copy(). * - Checks if $source and $destination are valid and readable/writable. - * - Checks that $source is not equal to $destination; if they are an error - * is reported. * - If file already exists in $destination either the call will error out, * replace the file or rename the file based on the $replace parameter. + * - If the $source and $destination are equal, the behavior depends on the + * $replace parameter. FILE_EXISTS_REPLACE will error out. FILE_EXISTS_RENAME + * will rename the file until the $destination is unique. * - Provides a fallback using realpaths if the move fails using stream * wrappers. This can occur because PHP's copy() function does not properly * support streams if safe_mode or open_basedir are enabled. See |