X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/704a4b7524e05d7bf4d208eb1b30be9989abef4c..ded4fa5b7a2a8177a6905b9b0fcda1d3dac2d0ff:/docs/latex/wx/filesys.tex diff --git a/docs/latex/wx/filesys.tex b/docs/latex/wx/filesys.tex index 0e7ec2db5e..b94dddbc86 100644 --- a/docs/latex/wx/filesys.tex +++ b/docs/latex/wx/filesys.tex @@ -3,34 +3,54 @@ % filesystem.tex at 21/Mar/99 23:00:52 % - \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}}} - \membersection{wxFileSystem::wxFileSystem}\label{wxfilesystemwxfilesystem} \func{}{wxFileSystem}{\void} 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}} @@ -63,7 +83,6 @@ fs -> ChangePathTo("subdir/folder", TRUE); f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !! \end{verbatim} - \membersection{wxFileSystem::GetPath}\label{wxfilesystemgetpath} \func{wxString}{GetPath}{\void} @@ -71,31 +90,27 @@ f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !! Returns actual path (set by \helpref{ChangePathTo}{wxfilesystemchangepathto}). -\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile} +\membersection{wxFileSystem::FindFirst}\label{wxfilesystemfindfirst} -\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}} +\func{wxString}{FindFirst}{\param{const wxString\& }{wildcard}, \param{int }{flags = 0}} -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. +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). +\membersection{wxFileSystem::FindNext}\label{wxfilesystemfindnext} -\membersection{wxFileSystem::AddHandler}\label{wxfilesystemaddhandler} +\func{wxString}{FindNext}{\void} -\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}} +Returns next filename that matches parameters passed to \helpref{FindFirst}{wxfilesystemfindfirst}. -This static function adds new handler into the list of handlers. -The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS. -\wxheading{Note} +\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile} -You can call +\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}} -\begin{verbatim} -wxFileSystem::AddHandler(new My_FS_Handler); -\end{verbatim} +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. -This is because a) AddHandler is static method and b) the handlers -are deleted in wxFileSystem's destructor so that you don't have to -care about it.