arr-ai / arrai

The ultimate data engine.
http://arr.ai
Apache License 2.0
20 stars 15 forks source link

Function to get all files in a directory tree #605

Closed orlade-anz closed 4 years ago

orlade-anz commented 4 years ago

Please do not post any internal, closed source snippets on this public issue tracker!

Purpose

Please describe the end goal you are trying to achieve that has led you to request this feature.

Std lib function to get all file paths in a directory.

We're starting to work with GitHub as a data source, and want to transform directories, not just files.

Suggested approaches

What have you tried, and how might this problem be solved?

//os.tree to use filepath.Walk and construct some Value.

Whatever structure it returns can be transformed to others, so it should be the structure that is easiest to understand. Probably a FS dict. However a list of file paths would be easier to map into file contents (//os.tree('dir') => .@item => {.: //os.file(.)}).