This project is read-only.

Creating directories in an archive

Apr 14, 2010 at 7:01 PM

First of all, thanks for developing this useful library. I'm currently using it for my own little backup program.

It's working pretty well, but I have no idea how to create (empty) folders inside an archive. I suppose it could work if I enabled SevenZipCompress.IncludeEmptyDirectories and zipped the files using CompressDirectory(), but that's not quite possible in my implementation.

You see, I'm using the Volume Shadow Copy service to obtain a snapshot of the files and the only way to reliably access those files is with streams. So I use CompressStreamDictionary() to correctly add them to the archive. Unfortunately, there is no such method for directory structure, or would it be possible to use the same method for that? If so, how?

It's not a huge problem right now, because it only applies to empty directories. The required directories for the files are automatically created anyway.

Apr 15, 2010 at 5:44 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.