Method: CloudFlock::Remote::Files#create

Defined in:
lib/cloudflock/remote/files.rb

#create(file_spec) ⇒ Object

Public: Create a file in the current directory.

file_spec - Hash containing info to create a new file:

:key  - Path under which the file should be created.
:body - Contents of the file to be created.

Returns nothing.



78
79
80
81
82
83
# File 'lib/cloudflock/remote/files.rb', line 78

def create(file_spec)
  @files.files.create(file_spec)
rescue Excon::Errors::Timeout, Fog::Storage::Rackspace::ServiceError
  # Triggered by server and request timeouts respectively.
  retry
end