We have -C
option in linux to remove the absolute path. I am trying to achieve the problem in Node.js
tar.create({
gzip: true,
file: 'test.tar.gz'
},
['../result/1670341264809/test/']
).then(_ => {
});
but with the above code it is creating the tar file with all absolute path, but I need tar file only from test folder. How to add the flag in node-js module.?