X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22d6efa851642c6a69174278fc50f712f41e2271..2e25e7b7629b9c362d1fc689b536032a35441b8c:/docs/latex/wx/filesys.tex diff --git a/docs/latex/wx/filesys.tex b/docs/latex/wx/filesys.tex index 25eb6181c1..b94dddbc86 100644 --- a/docs/latex/wx/filesys.tex +++ b/docs/latex/wx/filesys.tex @@ -5,19 +5,23 @@ \section{\class{wxFileSystem}}\label{wxfilesystem} -This class provides interface for opening files on different +This class provides an interface for opening files on different file systems. It can handle absolute and/or local filenames. -It uses system of \helpref{handlers}{wxfilesystemhandler} to +It uses a system of \helpref{handlers}{wxfilesystemhandler} to provide access to user-defined virtual file systems. \wxheading{Derived from} -wxObject +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + \wxheading{See Also} -\helpref{wxFileSystemHandler}{wxfilesystemhandler}, -\helpref{wxFSFile}{wxfsfile}, +\helpref{wxFileSystemHandler}{wxfilesystemhandler}, +\helpref{wxFSFile}{wxfsfile}, \helpref{Overview}{fs} \latexignore{\rtfignore{\wxheading{Members}}} @@ -28,6 +32,25 @@ wxObject Constructor. +\membersection{wxFileSystem::AddHandler}\label{wxfilesystemaddhandler} + +\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. + +\wxheading{Note} + +You can call: + +\begin{verbatim} +wxFileSystem::AddHandler(new My_FS_Handler); +\end{verbatim} + +This is because (a) AddHandler is a static method, and (b) the handlers +are deleted in wxFileSystem's destructor so that you don't have to +care about it. + \membersection{wxFileSystem::ChangePathTo}\label{wxfilesystemchangepathto} \func{void}{ChangePathTo}{\param{const wxString\& }{location}, \param{bool }{is\_dir = FALSE}} @@ -66,31 +89,28 @@ f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !! Returns actual path (set by \helpref{ChangePathTo}{wxfilesystemchangepathto}). -\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile} -\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}} +\membersection{wxFileSystem::FindFirst}\label{wxfilesystemfindfirst} -Opens file and returns pointer to \helpref{wxFSFile}{wxfsfile} object -or NULL if failed. It first tries to open the file in relative scope -(based on value passed to ChangePathTo() method) and then as an -absolute path. +\func{wxString}{FindFirst}{\param{const wxString\& }{wildcard}, \param{int }{flags = 0}} -\membersection{wxFileSystem::AddHandler}\label{wxfilesystemaddhandler} +Works like \helpref{wxFindFirstFile}{wxfindfirstfile}. Returns name of the first +filename (withing filesystem's current path) that matches {\it wildcard}. {\it flags} may be one of +wxFILE (only files), wxDIR (only directories) or 0 (both). -\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}} +\membersection{wxFileSystem::FindNext}\label{wxfilesystemfindnext} -This static function adds new handler into the list of handlers. -The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS. +\func{wxString}{FindNext}{\void} -\wxheading{Note} +Returns next filename that matches parameters passed to \helpref{FindFirst}{wxfilesystemfindfirst}. -You can call: -\begin{verbatim} -wxFileSystem::AddHandler(new My_FS_Handler); -\end{verbatim} +\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile} -This is because (a) AddHandler is a static method, and (b) the handlers -are deleted in wxFileSystem's destructor so that you don't have to -care about it. +\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}} + +Opens file and returns pointer to \helpref{wxFSFile}{wxfsfile} object +or NULL if failed. It first tries to open the file in relative scope +(based on value passed to ChangePathTo() method) and then as an +absolute path.