Method: CloudFS::RestAdapter#copy_file

Defined in:
lib/cloudfs/rest_adapter.rb

#copy_file(path, destination, name, exists: 'RENAME') ⇒ Hash

Copy file to specified destination folder

Parameters:

  • path (String)

    source file path

  • destination (String)

    destination folder path

  • name (String)

    new name of copied file

  • exists (String) (defaults to: 'RENAME')

    ('FAIL', 'OVERWRITE', 'RENAME') action to take in case of a conflict with an existing file An unused integer is appended to file name if exists: RENAME

Returns:

  • (Hash)

    metadata of new file

Raises:



380
381
382
# File 'lib/cloudfs/rest_adapter.rb', line 380

def copy_file(path, destination, name, exists: 'RENAME')
  copy(Constants::ENDPOINT_FILES, path, destination, name, exists: exists)
end