python libarchive to get mtime of the archive -


i have python libarchive 0.4.3 installed. i'd mtime of 7z file stored inside 7z file. different mtime of file stored locally on disk. let's underlying source c tarball lzma1604.7z.

the following program list of files , mtime of that. don't see time entire 7z "tarball" given in 7z file.

from libarchive.public import memory_reader open('lzma1604.7z', 'rb') f:     buffer = f.read()      memory_reader(buffer) archive:         entry in archive:             print(entry.pathname, entry.mtime) 

the above program prints:

('asm/arm/7zcrcopt.asm', datetime.datetime(2009, 10, 8, 5, 12)) ('asm/x86/7zasm.asm', datetime.datetime(2012, 12, 30, 3, 41, 54)) ... ('bin/7zsd.sfx', datetime.datetime(2016, 10, 4, 11, 12, 31)) ('bin/lzma.exe', datetime.datetime(2016, 10, 4, 11, 12, 30)) ('bin/x64/7zr.exe', datetime.datetime(2016, 10, 4, 10, 58, 29)) 

but if run 7z l lzma1604.7z gives @ end:

2016-10-04 10:12:31 ....a       113152               bin/7zsd.sfx 2016-10-04 10:12:30 ....a        97280               bin/lzma.exe 2016-10-04 09:58:29 ....a       742400               bin/x64/7zr.exe ------------------- ----- ------------ ------------  ------------------------ 2016-10-04 10:27:55            4534441       960121  620 files 

so how in python via libarchive information, specifically, mtime of overall archive?


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -