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