.\" This is a wxWidgets manpage page generated from the XML docs .TH wxFileSystemHandler 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxFileSystemHandler \- Class used to announce file system type .SH DESCRIPTION Classes derived from wxFileSystemHandler are used to access virtual file systems. Its public interface consists of two methods: CanOpen and OpenFile . It provides additional protected methods to simplify the process of opening the file: GetProtocol, GetLeftLocation, GetRightLocation, GetAnchor, GetMimeTypeFromExt. Please have a look at overview if you don't know how locations are constructed. Also consult list of available handlers . .SH NOTE The handlers are shared by all instances of wxFileSystem. wxHTML library provides handlers for local files and HTTP or FTP protocol The location parameter passed to OpenFile or CanOpen methods is always an absolute path. You don't need to check the FS's current path. .SH "PARENTS" wxObject .SH "INCLUDE FILES" wx/filesys.h .SH MEMBERS .SS wxFileSystemHandler () Constructor. .SS virtual bool CanOpen (const wxString& 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: bool MyHand::CanOpen(const wxString& location) { return (GetProtocol(location) == "http"); } Must be overridden in derived handlers. .SS wxString GetAnchor (const wxString& location) Returns the anchor if present in the location. See wxFSFile for details. Example: GetAnchor("index.htm#chapter2") == "chapter2" Note: the anchor is NOT part of the left location. .SS wxString GetLeftLocation (const wxString& location) Returns the left location string extracted from location . Example: GetLeftLocation("file:myzipfile.zip#zip:index.htm") == "file:myzipfile.zip" .SS wxString GetMimeTypeFromExt (const wxString& location) Returns the MIME type based on extension of location . (While wxFSFile::GetMimeType returns real MIME type - either extension-based or queried from HTTP.) Example : GetMimeTypeFromExt("index.htm") == "text/html" .SS wxString GetProtocol (const wxString& location) Returns the protocol string extracted from location . Example: GetProtocol("file:myzipfile.zip#zip:index.htm") == "zip" .SS wxString GetRightLocation (const wxString& location) Returns the right location string extracted from location . Example : GetRightLocation("file:myzipfile.zip#zip:index.htm") == "index.htm" .SS virtual wxString FindFirst (const wxString& wildcardint flags = 0) Works like wxFindFirstFile . Returns name of the first filename (within filesystem's current path) that matches wildcard . flags may be one of wxFILE (only files), wxDIR (only directories) or 0 (both). This method is only called if CanOpen returns true. .SS virtual wxString FindNext () Returns next filename that matches parameters passed to FindFirst . This method is only called if CanOpen returns true and FindFirst returned a non-empty string. .SS virtual wxFSFile* OpenFile (wxFileSystem& fsconst wxString& location) Opens the file and returns wxFSFile pointer or NULL if failed. Must be overridden in derived handlers. .SH "SEE ALSO" wxObject wxFileSystem wxFSFile Overview .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.