2 % automatically generated by HelpGen from
3 % filesystem.tex at 21/Mar/99 23:00:52
7 \section{\class{wxFileSystem
}}\label{wxfilesystem
}
9 This class provides interface for opening files on different
10 file systems. It can handle absolute and/or local filenames.
11 It uses system of
\helpref{handlers
}{wxfilesystemhandler
} to
12 provide access to user-defined virtual file systems.
14 \wxheading{Derived from
}
20 \helpref{wxFileSystemHandler
}{wxfilesystemhandler
},
21 \helpref{wxFSFile
}{wxfsfile
},
22 \helpref{Overview
}{fs
}
25 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \membersection{wxFileSystem::wxFileSystem
}\label{wxfilesystemwxfilesystem
}
30 \func{}{wxFileSystem
}{\void}
34 \membersection{wxFileSystem::ChangePathTo
}\label{wxfilesystemchangepathto
}
36 \func{void
}{ChangePathTo
}{\param{const wxString\&
}{location
},
\param{bool
}{is
\_dir = FALSE
}}
38 Sets the current location.
{\it location
} parameter passed to
39 \helpref{OpenFile
}{wxfilesystemopenfile
} is relative to this path.
41 {\bf Caution!
} Unless
{\it is
\_dir} is TRUE the
{\it location
} parameter
42 is not directory name but the name of the file in this directory!! All these
43 commands change path to "dir/subdir/" :
46 ChangePathTo("dir/subdir/xh.htm");
47 ChangePathTo("dir/subdir", TRUE);
48 ChangePathTo("dir/subdir/", TRUE);
51 \wxheading{Parameters
}
53 \docparam{location
}{the new location. Its meaning depends on value of
{\it is
\_dir}}
55 \docparam{is
\_dir}{if TRUE
{\it location
} is new directory. If FALSE (default)
56 {\it location
} is
{\bf file in
} the new directory.
}
61 f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
62 fs -> ChangePathTo("subdir/folder", TRUE);
63 f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !!
67 \membersection{wxFileSystem::GetPath
}\label{wxfilesystemgetpath
}
69 \func{wxString
}{GetPath
}{\void}
71 Returns actual path (set by
\helpref{ChangePathTo
}{wxfilesystemchangepathto
}).
74 \membersection{wxFileSystem::OpenFile
}\label{wxfilesystemopenfile
}
76 \func{wxFSFile*
}{OpenFile
}{\param{const wxString\&
}{location
}}
78 Opens file and returns pointer to
\helpref{wxFSFile
}{wxfsfile
} object
79 or 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
84 \membersection{wxFileSystem::AddHandler
}\label{wxfilesystemaddhandler
}
86 \func{static void
}{AddHandler
}{\param{wxFileSystemHandler
}{*handler
}}
88 This static function adds new handler into the list of handlers.
89 The
\helpref{handlers
}{wxfilesystemhandler
} provide access to virtual FS.
96 wxFileSystem::AddHandler(new My_FS_Handler);
99 This is because a) AddHandler is static method and b) the handlers
100 are deleted in wxFileSystem's destructor so that you don't have to