compressing icon indicating copy to clipboard operation
compressing copied to clipboard

is it possible to zip a directory without including the parent directory as root?

Open jhudson8 opened this issue 6 years ago • 2 comments

for example compressing.zip.compressDir('/foo/bar', 'foo.zip') will end up with

/bar/a.txt
/bar/b.txt

whereas I'd like to have

/a.txt
/b.txt

Thanks

jhudson8 avatar Apr 06 '18 20:04 jhudson8

I think that at the time of writing this, it's resolved. I have seen in the code the next:

As third argument, pass ignoreBase as true.

compressing.zip.compressDir('/foo/bar/', 'foo.zip', {
    ignoreBase: true
});

wiliam-paradox avatar Jul 16 '19 14:07 wiliam-paradox

It should be highlighted in document, definitely

davidkhala avatar May 17 '20 10:05 davidkhala