I am trying to build a script written in Python which explore an archive (in this case a zip), and recursively gets all meta-data of files.
I usually use the following command to get meta-data:
(mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(fname)
The problem is that I don't want to extract the files from the zip, so I don't have a path to provide to os.stat(). The only thing I am able to do is:
z=zipfile.ZipFile(zfilename,'r')
for info in z.infolist():
fname = info.filename
data = z.read(fname)
Can I use the 'data' to get informations I need? or should I use another approach?