Module: S3Tree

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

Defined Under Namespace

Classes: Directory, File

Constant Summary collapse

VERSION =
"0.0.2"

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 = path + '/' if path.present?
  s3 = Aws::S3::Resource.new
  bucket = s3.bucket(bucket_name)
  S3Tree::Directory.new(bucket,path).children
end