I have a simple question yet I didn't manage to find a lot of information about it or understand it very well.
When I open a tarfile in python using the tarfile.open()
method, how exactly are the files in the tarfile read? I have a tarfile with data on people, each person has his own folder and in that folder his data is divided between different folders.
Will the files be accessed depending on internal structure or is there another way to determine which file will be accessed next when I use tarfile.extractfile()
?
Thank you in advance
Internal structure. tar
stands for "tape archive", and the big design point is the ability to work sequentially with small RAM, while writing to (or reading from) a sequential-access IO device (also known as tape): loading everything into memory and then processing it in some specific order was not possible. Thus, files are extracted in the order they are found in the archive, by reading the archive in order.