How to treat compressed folders as files using ShellObject from WindowsAPICodePack?

Posted by JustABill on Stack Overflow See other posts from Stack Overflow or by JustABill
Published on 2010-05-25T19:57:06Z Indexed on 2010/05/25 20:01 UTC
Read the original article Hit count: 147

Filed under:
|

I am trying to implement a filesystem browser using the WindowsAPICodePack for C# (.Net 4), and it works pretty well, except that the ShellObject system treats zip files as folders, whereas I'd prefer they be files. Is there some way I can force it to work this way? The low-level interop it does is beyond me.

As far as I can tell, internally it asks if the item is a Folder or a Filesystem element. It then uses this (and some type checks) to figure out what it actually is. Is it safe to force it to treat it as a file if it's Compressed? Or do I have to do something else?

© Stack Overflow or respective owner

Related posts about c#

Related posts about compressed-folder