The Directory Opus VFS Plugin SDK lets you extend Directory Opus by writing VFS plugins to add support for additional archive formats, virtual file systems and any other devices or methods of representing data in a folder/file hierarchy.

The plugin API describes a filesystem-like interface which includes matching functions for many common Windows API functions (e.g. FindFirstFile, FindNextFile, CreateFile, ReadFile, WriteFile, etc.). Not all functions need to be implemented, however; the plugin provides a capabilities mask which indicates which functionality it supports.

VFS plugins are invoked by Directory Opus whenever the user attempts to browse to a file or folder that a plugin has indicated it supports. When Opus starts it initializes the plugins, each of which fills out an information structure describing which file extensions it handles. Optionally, a plugin can implement an entire virtual namespace by specifying a URL-style path prefix (e.g. coll:// is used to represent the virtual File Collection namespace).

Plugins using the path prefix method will be invoked automatically whenever the user enters a matching path into an Opus Lister's location field. On the other hand, plugins that operate on files via specific file extensions may require additional user-configuration via the Opus File Types system, usually in the shape of setting the dblclk action to run the Go command..

VFS plugins are DLLs which exist in the VFSPlugins sub-directory of the Directory Opus program files folder. The Preferences Dialog's Plugins section lists all VFS plugins and allow users to enable, disable and, if the plugin supports it, configure them, Viewer plugins, which are covered by a separate SDK, are shown in the Preferences dialog under a separate tab.

Accompanying the header files is the source to the Directory Opus RAR plugin. This plugin uses the freely distributable UnRAR.dll component and as such only supports extraction from RAR files. While it does not support creating or modifying RAR files it should still serve as a good example of a VFS Plugin.

More: