Physical or virtual items?

The ShellItem class is the central class of ShellBoost. It represents a Shell Item that can be seen in the folder view. A Shell Item can also represent a folder. The ShellBoost’s ShellFolder class derives from the ShellItem class and is used to represent folders in the Shell.

In most ShellBoost projects, you will have to create sub classes, from ShellItem and ShellFolder classes, to represent your own custom items and folders.

From a functional and technical perspective, ShellBoost supports two fundamental types of ShellItem (or ShellFolder since a ShellFolder is a ShellItem) instances:

A ShellItem associated with a physical file system path (file or folder)

A ShellItem not associated with any physical path. In this case the item is fully virtual.

Physical or virtual items? - Picture 4

Here are some key points to remember when choosing virtual or physical ShellItems:

A ShellFolder can contain any combination of virtual and physical ShellItems;

Even if you choose a physical ShellItem, you will still be able to change many of its properties. How the end-user will view and use such an item will still be controlled by your extension to a certain point. For example, you can hide physical shell items from your extension.

A physical ShellItem benefits from a better automatic Shell integration, in general. For example, many 3rd context menu handlers will add menu items to Shell Items that are backed by a physical file;

A physical ShellItem has much better support for custom applications (like Office applications, notepad, etc.);

ShellBoost does not support in-place modification of Virtual ShellItems content. The end user will be able to open a virtual Excel file for example, but he will not be able to save it back in the same shell place;

Since Virtual Shell Items don’t need to have a corresponding physical file nor directory, they can support custom file names with characters usually forbidden for standard physical files (like < > : etc.). This can be very important when displaying items coming from an external source;

All aspects (existence, content, properties, etc.) of a Virtual Shell Item may vary according to the context (the logged in user for example, time, language, anything you’d like). So for example, you could show to all users the same virtual PDF file with the exact same name, in the same directory, whose content would change each time a user opens it in the Windows Explorer.