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