fstream icon indicating copy to clipboard operation
fstream copied to clipboard

fstream.Reader(path) includes directory

Open shevchuk opened this issue 10 years ago • 3 comments

There is no way to make reader read a subset of files excluding their parent directory. Even if fstream.Reader("./") is called it includes a parent folder.

shevchuk avatar Jun 27 '14 12:06 shevchuk

Just ran into this. I'm trying to make tarballs for the Docker API which expects a flat structure.

orospakr avatar Aug 05 '14 21:08 orospakr

fstream.Reader({ path: __dirname, root: './' }) is worked for me to exclude parent directory name.

llun avatar Sep 08 '14 07:09 llun

Also you can pass fromBase property to tar module.

floatdrop avatar Jun 14 '16 09:06 floatdrop