diff --git includes/file.inc includes/file.inc index 8f266e1..0845a9d 100644 --- includes/file.inc +++ includes/file.inc @@ -461,7 +461,7 @@ function file_space_used($uid = NULL) { * @param $source * A string specifying the name of the upload field to save. * @param $validators - * An optional, associative array of callback functions used to validate the + * (optional) An associative array of callback functions used to validate the * file. The keys are function names and the values arrays of callback * parameters which will be passed in after the user and file objects. The * functions should return an array of error messages, an empty array @@ -471,9 +471,12 @@ function file_space_used($uid = NULL) { * A string containing the directory $source should be copied to. If this is * not provided or is not writable, the temporary directory will be used. * @param $replace - * A boolean indicating whether an existing file of the same name in the - * destination directory should overwritten. A false value will generate a - * new, unique filename in the destination directory. + * Replace behavior when the destination file already exists: + * - FILE_EXISTS_REPLACE: Replace the existing file. + * - FILE_EXISTS_RENAME: Append _{incrementing number} until the filename + * is unique. + * - FILE_EXISTS_ERROR: Do nothing and return FALSE. + * * @return * An object containing the file information, or 0 in the event of an error. */