src/Liip/Drupal/Modules/DrupalConnector/File.php
function file_save_data($data, $destination = NULL, $replace = FILE_EXISTS_RENAME) {
        return file_save_data($data, $destination, $replace);
    }
function file_save_data($data, $destination = NULL, $replace = FILE_EXISTS_RENAME) {
        return file_save_data($data, $destination, $replace);
    }
function file_save_data ( $ data , $ destination = NULL , $ replace = FILE_EXISTS_RENAME ) { return file_save_data ( $ data , $ destination , $ replace ) ; }
Saves a file to the specified destination and creates a database entry.

@param $data
A string containing the contents of the file.
@param $destination
A string containing the destination URI. This must be a stream wrapper URI.
If no value is provided, a randomized name will be generated and the file
will be saved using Drupal's default files scheme, usually "public://".
@param $replace
Replace behavior when the destination file already exists:
- FILE_EXISTS_REPLACE - Replace the existing file. If a managed file with
the destination name exists then its database entry will be updated. If
no database entry is found then a new one will be created.
- FILE_EXISTS_RENAME - Append _{incrementing number} until the filename is
unique.
- FILE_EXISTS_ERROR - Do nothing and return FALSE.

@return
A file object, or FALSE on error.

@see file_unmanaged_save_data()
Saves a file to the specified destination and creates a database entry .