> Hello all,
> I want to retreive the rights access of a file in a zip file ( a zip file witch contains many files)
> if i use:
- Code: Select all
> ifstream l_Inputstream("DOCS.zip", std::ios::binary);
> ZipArchive Arch(l_Inputstream);
> ZipArchive::FileHeaders::const_iterator it = Arch.findHeader("toto.txt"); //toto.txt is the file in the archive DOCS.zip
> I can't wtih this iterator it retreive the file attributes ( read/write,)
> also i used the method with Decompress class but i noticed that the access of the file toto is always R/W even if set it ReadOnly !!
> Please, can you help me to retreive the rights access of this file toto.txt
> Thank you a lot
This is not supported in the current implementation of PocoZip.
If you take a look at the ZipSpecs (in doc folder) this would require
setting and interpreting the external file attributes field of the
the file header in the Central directory structure.Interpretation of
the values is platform dependent and I couldn't find any information on how to do that.
You are more than welcome to add this feature to PocoZip (ZipFileInfo must be extended).
There is already a getExternalFileAttributes method, you can build on that one
(add a public isReadOnly method which uses getExternalFileAttributes).
But PocoZip doesnot set this field, so this would be needed too.
That's about as much help as I can give you here :-)
> BARHOUMI Badreddine