koresar / s3-ls

List contents of an S3 bucket 'folder'. Node.js module and command line executable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get recursively result?

favoyang opened this issue · comments

For s3 content

my-folder/subfolder/file1
my-folder/subfolder/file2
my-folder/subfolder/subsub/file3

Current lister.ls('my-folder/') returns

files: []
folders: ['subfolder']

I would like to have lister.ls('my-folder/', recursively=true) returns

files:
  - subfolder/file1
  - subfolder/file2
  - subfolder/subsub/file3
folders:
  - subfolder
  - subfolder/subsub

Is this possible?

Yeap. That is possible. See the sibling project https://github.com/koresar/s3-tree
Tell me if it works for you.

@koresar thanks for the link, work like a charm!