]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/filesys.tex
fixed bug in PS clipping (non-virtual SetClippingRegion was overloaded)
[wxWidgets.git] / docs / latex / wx / filesys.tex
CommitLineData
704a4b75
VS
1%
2% automatically generated by HelpGen from
3% filesystem.tex at 21/Mar/99 23:00:52
4%
5
704a4b75
VS
6\section{\class{wxFileSystem}}\label{wxfilesystem}
7
8This class provides interface for opening files on different
9file systems. It can handle absolute and/or local filenames.
10It uses system of \helpref{handlers}{wxfilesystemhandler} to
11provide access to user-defined virtual file systems.
12
13\wxheading{Derived from}
14
15wxObject
16
17\wxheading{See Also}
18
19\helpref{wxFileSystemHandler}{wxfilesystemhandler},
20\helpref{wxFSFile}{wxfsfile},
21\helpref{Overview}{fs}
22
704a4b75
VS
23\latexignore{\rtfignore{\wxheading{Members}}}
24
704a4b75
VS
25\membersection{wxFileSystem::wxFileSystem}\label{wxfilesystemwxfilesystem}
26
27\func{}{wxFileSystem}{\void}
28
29Constructor.
30
31\membersection{wxFileSystem::ChangePathTo}\label{wxfilesystemchangepathto}
32
33\func{void}{ChangePathTo}{\param{const wxString\& }{location}, \param{bool }{is\_dir = FALSE}}
34
35Sets the current location. {\it location} parameter passed to
36\helpref{OpenFile}{wxfilesystemopenfile} is relative to this path.
37
38{\bf Caution! } Unless {\it is\_dir} is TRUE the {\it location} parameter
39is not directory name but the name of the file in this directory!! All these
40commands change path to "dir/subdir/" :
41
42\begin{verbatim}
43ChangePathTo("dir/subdir/xh.htm");
44ChangePathTo("dir/subdir", TRUE);
45ChangePathTo("dir/subdir/", TRUE);
46\end{verbatim}
47
48\wxheading{Parameters}
49
50\docparam{location}{the new location. Its meaning depends on value of {\it is\_dir}}
51
52\docparam{is\_dir}{if TRUE {\it location} is new directory. If FALSE (default)
53{\it location} is {\bf file in} the new directory.}
54
55\wxheading{Example}
56
57\begin{verbatim}
58f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
59fs -> ChangePathTo("subdir/folder", TRUE);
60f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !!
61\end{verbatim}
62
704a4b75
VS
63\membersection{wxFileSystem::GetPath}\label{wxfilesystemgetpath}
64
65\func{wxString}{GetPath}{\void}
66
67Returns actual path (set by \helpref{ChangePathTo}{wxfilesystemchangepathto}).
68
704a4b75
VS
69\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile}
70
71\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}}
72
73Opens file and returns pointer to \helpref{wxFSFile}{wxfsfile} object
74or NULL if failed. It first tries to open the file in relative scope
75(based on value passed to ChangePathTo() method) and then as an
76absolute path.
77
704a4b75
VS
78\membersection{wxFileSystem::AddHandler}\label{wxfilesystemaddhandler}
79
80\func{static void}{AddHandler}{\param{wxFileSystemHandler }{*handler}}
81
82This static function adds new handler into the list of handlers.
83The \helpref{handlers}{wxfilesystemhandler} provide access to virtual FS.
84
85\wxheading{Note}
86
22d6efa8 87You can call:
704a4b75
VS
88
89\begin{verbatim}
90wxFileSystem::AddHandler(new My_FS_Handler);
91\end{verbatim}
92
22d6efa8 93This is because (a) AddHandler is a static method, and (b) the handlers
704a4b75
VS
94are deleted in wxFileSystem's destructor so that you don't have to
95care about it.
22d6efa8 96