care about it.
+\membersection{wxFileSystem::HasHandlerForPath}\label{wxfilesystemhashandlerforpath}
+
+\func{static bool}{HasHandlerForPath}{\param{const wxString \&}{ location}}
+
+This static function returns \true if there is a registered handler which can open the given
+location.
+
+
\membersection{wxFileSystem::ChangePathTo}\label{wxfilesystemchangepathto}
\func{void}{ChangePathTo}{\param{const wxString\& }{location}, \param{bool }{is\_dir = false}}
// In fact, this class is only front-end to the FS handlers :-)
static void AddHandler(wxFileSystemHandler *handler);
+ // Returns true if there is a handler which can open the given location.
+ static bool HasHandlerForPath(const wxString& location);
+
// remove all items from the m_Handlers list
static void CleanUpHandlers();
m_Handlers.Append(handler);
}
+bool wxFileSystem::HasHandlerForPath(const wxString &location)
+{
+ for ( wxList::compatibility_iterator node = m_Handlers.GetFirst();
+ node; node = node->GetNext() )
+ {
+ wxFileSystemHandler *h = (wxFileSystemHandler*) node->GetData();
+ if (h->CanOpen(location))
+ return true;
+ }
+
+ return false;
+}
void wxFileSystem::CleanUpHandlers()
{