Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

read dir content but ignore it in the pipe  #9

Open
@jfromaniello

Description

@jfromaniello

I have directory like:

bar/
   foo.txt
   baz.bin
   dir/
      another.txt

and I do something like

var reader = fstream.Reader({path: source, type: "Directory"}),
    writer =  fstream.Writer(path.join(source,'test.tgz')), 
    pack = tar.Pack(),
    gzip = zlib.createGzip();

reader.pipe(pack)
    .pipe(gzip)
    .pipe(writer); 

the problem I have is that the generated .tgz has the "bar" directory in the root and I'd like to have only the content of that directory (i.e. foo.txt, bar.bin, folder).

Is there a way i can do this?

thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions