******************** wx.FileSystemHandler ******************** Inheritance diagram for `wx.FileSystemHandler`: | .. inheritance-diagram:: wx.FileSystemHandler | Description =========== Classes derived from `wx.FileSystemHandler` are used to access virtual file systems. Its public interface consists of two methods: `CanOpen <#CanOpen>`_ and `OpenFile <#OpenFile>`_. It provides additional protected methods to simplify the process of opening the file. .. seealso:: `wx.FileSystem `_, `wx.FSFile `_ Derived From ^^^^^^^^^^^^^ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `CanOpen <#CanOpen>`_ * `FindFirst <#FindFirst>`_ * `FindNext <#FindNext>`_ * `GetAnchor <#GetAnchor>`_ * `GetLeftLocation <#GetLeftLocation>`_ * `GetMimeTypeFromExt <#GetMimeTypeFromExt>`_ * `GetProtocol <#GetProtocol>`_ * `GetRightLocation <#GetRightLocation>`_ * `OpenFile <#OpenFile>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Anchor <#Anchor>`_ * `LeftLocation <#LeftLocation>`_ * `MimeTypeFromExt <#MimeTypeFromExt>`_ * `Protocol <#Protocol>`_ * `RightLocation <#RightLocation>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() `No docstrings available for this method.` -------- .. method:: CanOpen(location) Returns ``True`` if the handler is able to open this file. This function doesn't check whether the file exists or not, it only checks if it knows the protocol. Example:: def CanOpen(location): return self.GetProtocol(location) == "http" Must be overridden in derived handlers. **Parameters:** * `location` (string) | **Returns:** `bool` -------- .. method:: FindFirst(wildcard, flags=0) Returns name of the first filename (within filesystem's current path) that matches `wildcard`. `flags` may be one of ``wx.FILE`` (only files), ``wx.DIR`` (only directories) or 0 (both). This method is only called if `CanOpen <#CanOpen>`_ returns ``True``. **Parameters:** * `wildcard` (string) * `flags` (int) | **Returns:** `string` -------- .. method:: FindNext() Returns next filename that matches parameters passed to `FindFirst <#FindFirst>`_. This method is only called if `CanOpen <#CanOpen>`_ returns ``True`` and FindFirst returned a non-empty string. | **Returns:** `string` -------- .. method:: GetAnchor(location) Returns the anchor if present in the location. **Parameters:** * `location` (string) | **Returns:** `string` .. note:: the anchor is NOT part of the left location. .. seealso:: `wx.FSFile `_ -------- .. method:: GetLeftLocation(location) Returns the left location string extracted from `location`. **Parameters:** * `location` (string) | **Returns:** `string` -------- .. method:: GetMimeTypeFromExt(location) Returns the MIME type based on **extension** of `location`. (While `wx.FSFile.GetMimeType `_ returns real MIME type - either extension-based or queried from HTTP.) **Parameters:** * `location` (string) | **Returns:** `string` -------- .. method:: GetProtocol(location) Returns the protocol string extracted from `location`. **Parameters:** * `location` (string) | **Returns:** `string` -------- .. method:: GetRightLocation(location) Returns the right location string extracted from `location`. **Parameters:** * `location` (string) | **Returns:** `string` -------- .. method:: OpenFile(fs, location) Opens the file and returns `wx.FSFile `_ pointer or ``None`` if failed. Must be overridden in derived handlers. **Parameters:** * `fs` (`wx.FileSystem `_): Parent FS (the FS from that `OpenFile` was called). * `location` (string): The **absolute** location of file. | **Returns:** `wx.FSFile `_ -------- Properties ^^^^^^^^^^ .. attribute:: Anchor See `GetAnchor <#GetAnchor>`_ .. attribute:: LeftLocation See `GetLeftLocation <#GetLeftLocation>`_ .. attribute:: MimeTypeFromExt See `GetMimeTypeFromExt <#GetMimeTypeFromExt>`_ .. attribute:: Protocol See `GetProtocol <#GetProtocol>`_ .. attribute:: RightLocation See `GetRightLocation <#GetRightLocation>`_