Module: S3Tree

Defined in:
lib/s3_tree.rb,
lib/s3_tree/files.rb,
lib/s3_tree/version.rb,
lib/s3_tree/directory.rb

Defined Under Namespace

Classes: Directory, Files

Constant Summary collapse

VERSION =
"0.0.5"

Class Method Summary collapse

Class Method Details

.tree(bucket_name, path = '') ⇒ Object



6
7
8
9
10
11
# File 'lib/s3_tree.rb', line 6

def self.tree(bucket_name,path='')
  path = URI.decode(path).gsub('+', ' ') if path.present?
  s3 = Aws::S3::Resource.new
  bucket = s3.bucket(bucket_name)
  S3Tree::Directory.new(bucket,path).children
end