When I invoke add()
on a tarfile
object with a file path, the file is added to the tarball with directory hiearchy associated .In other words, if I unzip the tarfile the directories in the original dir hiearchy are reproduced.
Is there a way to simply add a plainfile without directory info that untarring the resulting tarball produce a flat list of files?