fstream
fstream copied to clipboard
fstream.Reader(path) includes directory
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.
Just ran into this. I'm trying to make tarballs for the Docker API which expects a flat structure.
fstream.Reader({ path: __dirname, root: './' })
is worked for me to exclude parent directory name.
Also you can pass fromBase
property to tar
module.