git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40302
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}}
-This static function adds new handler into the list of handlers.
-The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS.
+This static function adds new handler into the list of
+\helpref{handlers}{wxfilesystemhandler} which provide access to virtual FS.
+Note that if two handlers for the same protocol are added, the last one added
+takes precedence.
\wxheading{Note}
void wxFileSystem::AddHandler(wxFileSystemHandler *handler)
{
- m_Handlers.Append(handler);
+ // prepend the handler to the beginning of the list because handlers added
+ // last should have the highest priority to allow overriding them
+ m_Handlers.Insert(0u, handler);
}
bool wxFileSystem::HasHandlerForPath(const wxString &location)