9.1 Overview

Plugins that have the capability flag HWPLUG_CAPS_DIRADAPTER set can hook into Hollywood's directory handler. Whenever Hollywood has to scan a directory, it will first ask all the plugins that have hooked themselves into Hollywood's directory handler if one of them wants to scan it instead.

Please note that directory adapters are not automatically initialized when Hollywood loads the plugin. Instead, you have to manually call hw_AddLoaderAdapter() in your RequirePlugin() function to activate the directory adapter. The directory adapter will then only be activated if the user calls @REQUIRE on your plugin. See Auto and manual plugin initialization for details. If you do not call hw_AddLoaderAdapter() on your directory adapter plugin, it will only be available if the user addresses it directly through the Adapter tag.

See hw_AddLoaderAdapter for information on how to add your directory adapter.

This plugin type is supported since Hollywood 6.0.

Starting with Hollywood 8.0 directory adapter plugins support the HWEXT_DIRADAPTER_REWIND extension. If this extension is set, a directory adapter declares itself capable of rewinding a directory handle. If you set the HWEXT_DIRADAPTER_REWIND extension bit, you need to implement the RewindDir() function. See Extension plugins to learn how to use plugin extension bits. Note that it is recommended for directory adapters to support the HWEXT_DIRADAPTER_REWIND extension because rewinding a directory is a core functionality which all directory adapters should support. Otherwise not all Hollywood functions will be available to the directory adapter.

Starting with Hollywood 9.0 directory adapter plugins support the HWEXT_DIRADAPTER_STAT extension. If this extension is set, a directory adapter declares itself capable of obtaining additional information about open directories. If you set the HWEXT_DIRADAPTER_STAT extension bit, you need to implement the StatDir() function. See Extension plugins to learn how to use plugin extension bits. Note that it is recommended for directory adapters to support the HWEXT_DIRADAPTER_STAT extension because getting information like date, time, and DOS attributes is a core functionality which all directory adapters should support. Otherwise not all Hollywood functions will be available to the directory adapter.


Show TOC