1999-07-10 21:17:24 +00:00
|
|
|
%
|
|
|
|
% automatically generated by HelpGen from
|
|
|
|
% filesystem.tex at 21/Mar/99 23:00:52
|
|
|
|
%
|
|
|
|
|
|
|
|
\section{\class{wxFileSystem}}\label{wxfilesystem}
|
|
|
|
|
1999-11-01 20:36:43 +00:00
|
|
|
This class provides an interface for opening files on different
|
1999-07-10 21:17:24 +00:00
|
|
|
file systems. It can handle absolute and/or local filenames.
|
1999-11-01 20:36:43 +00:00
|
|
|
It uses a system of \helpref{handlers}{wxfilesystemhandler} to
|
1999-07-10 21:17:24 +00:00
|
|
|
provide access to user-defined virtual file systems.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
2000-02-27 21:06:58 +00:00
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/filesys.h>
|
1999-07-10 21:17:24 +00:00
|
|
|
|
|
|
|
\wxheading{See Also}
|
|
|
|
|
1999-11-01 20:36:43 +00:00
|
|
|
\helpref{wxFileSystemHandler}{wxfilesystemhandler},
|
|
|
|
\helpref{wxFSFile}{wxfsfile},
|
1999-07-10 21:17:24 +00:00
|
|
|
\helpref{Overview}{fs}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxFileSystem::wxFileSystem}\label{wxfilesystemwxfilesystem}
|
|
|
|
|
|
|
|
\func{}{wxFileSystem}{\void}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
1999-10-16 15:38:26 +00:00
|
|
|
\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.
|
|
|
|
|
1999-07-10 21:17:24 +00:00
|
|
|
\membersection{wxFileSystem::ChangePathTo}\label{wxfilesystemchangepathto}
|
|
|
|
|
|
|
|
\func{void}{ChangePathTo}{\param{const wxString\& }{location}, \param{bool }{is\_dir = FALSE}}
|
|
|
|
|
|
|
|
Sets the current location. {\it location} parameter passed to
|
|
|
|
\helpref{OpenFile}{wxfilesystemopenfile} is relative to this path.
|
|
|
|
|
|
|
|
{\bf Caution! } Unless {\it is\_dir} is TRUE the {\it location} parameter
|
|
|
|
is not directory name but the name of the file in this directory!! All these
|
|
|
|
commands change path to "dir/subdir/" :
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
ChangePathTo("dir/subdir/xh.htm");
|
|
|
|
ChangePathTo("dir/subdir", TRUE);
|
|
|
|
ChangePathTo("dir/subdir/", TRUE);
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{location}{the new location. Its meaning depends on value of {\it is\_dir}}
|
|
|
|
|
|
|
|
\docparam{is\_dir}{if TRUE {\it location} is new directory. If FALSE (default)
|
|
|
|
{\it location} is {\bf file in} the new directory.}
|
|
|
|
|
|
|
|
\wxheading{Example}
|
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
|
|
|
|
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}
|
|
|
|
|
|
|
|
Returns actual path (set by \helpref{ChangePathTo}{wxfilesystemchangepathto}).
|
|
|
|
|
1999-10-31 22:05:10 +00:00
|
|
|
|
|
|
|
\membersection{wxFileSystem::FindFirst}\label{wxfilesystemfindfirst}
|
|
|
|
|
|
|
|
\func{wxString}{FindFirst}{\param{const wxString\& }{wildcard}, \param{int }{flags = 0}}
|
|
|
|
|
|
|
|
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}
|
|
|
|
|
|
|
|
\func{wxString}{FindNext}{\void}
|
|
|
|
|
|
|
|
Returns next filename that matches parameters passed to \helpref{FindFirst}{wxfilesystemfindfirst}.
|
|
|
|
|
|
|
|
|
1999-07-10 21:17:24 +00:00
|
|
|
\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile}
|
|
|
|
|
|
|
|
\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.
|
|
|
|
|