Class: AwsCli::CLI::Sss::Files

Inherits:
Thor
  • Object
show all
Defined in:
lib/awscli/cli/s3/files.rb

Instance Method Summary collapse

Instance Method Details

#copyObject



69
70
71
72
# File 'lib/awscli/cli/s3/files.rb', line 69

def copy
  create_s3_object
  @s3.copy_file options[:source_bucket], options[:source_file], options[:dest_bucket], options[:dest_file]
end

#deleteObject



59
60
61
62
# File 'lib/awscli/cli/s3/files.rb', line 59

def delete
  create_s3_object
  @s3.delete_file options[:bucket_name], options[:file_name]
end

#getObject



51
52
53
54
# File 'lib/awscli/cli/s3/files.rb', line 51

def get
  create_s3_object
  @s3.download_file options[:bucket_name], options[:file_name], options[:local_path]
end

#listObject



9
10
11
12
# File 'lib/awscli/cli/s3/files.rb', line 9

def list
  create_s3_object
  @s3.list options[:bucket_name]
end

#public_urlObject



77
78
79
80
# File 'lib/awscli/cli/s3/files.rb', line 77

def public_url
  create_s3_object
  @s3.get_public_url options[:bucket_name], options[:file_name]
end

#putObject



17
18
19
20
# File 'lib/awscli/cli/s3/files.rb', line 17

def put
  create_s3_object
  @s3.upload_file options[:bucket_name], options[:file_path]
end

#put_bigObject



42
43
44
45
# File 'lib/awscli/cli/s3/files.rb', line 42

def put_big
  create_s3_object
  @s3.multipart_upload options
end

#put_recObject



28
29
30
31
# File 'lib/awscli/cli/s3/files.rb', line 28

def put_rec
  create_s3_object
  @s3.upload_file_rec options
end