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::AddHandler
}\label{wxfilesystemaddhandler
}
33 \func{static void
}{AddHandler
}{\param{wxFileSystemHandler
}{*handler
}}
35 This static function adds new handler into the list of handlers.
36 The
\helpref{handlers
}{wxfilesystemhandler
} provide access to virtual FS.
43 wxFileSystem::AddHandler(new My_FS_Handler);
46 This is because (a) AddHandler is a static method, and (b) the handlers
47 are deleted in wxFileSystem's destructor so that you don't have to
50 \membersection{wxFileSystem::ChangePathTo
}\label{wxfilesystemchangepathto
}
52 \func{void
}{ChangePathTo
}{\param{const wxString\&
}{location
},
\param{bool
}{is
\_dir = FALSE
}}
54 Sets the current location.
{\it location
} parameter passed to
55 \helpref{OpenFile
}{wxfilesystemopenfile
} is relative to this path.
57 {\bf Caution!
} Unless
{\it is
\_dir} is TRUE the
{\it location
} parameter
58 is not directory name but the name of the file in this directory!! All these
59 commands change path to "dir/subdir/" :
62 ChangePathTo("dir/subdir/xh.htm");
63 ChangePathTo("dir/subdir", TRUE);
64 ChangePathTo("dir/subdir/", TRUE);
67 \wxheading{Parameters
}
69 \docparam{location
}{the new location. Its meaning depends on value of
{\it is
\_dir}}
71 \docparam{is
\_dir}{if TRUE
{\it location
} is new directory. If FALSE (default)
72 {\it location
} is
{\bf file in
} the new directory.
}
77 f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
78 fs -> ChangePathTo("subdir/folder", TRUE);
79 f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !!
82 \membersection{wxFileSystem::GetPath
}\label{wxfilesystemgetpath
}
84 \func{wxString
}{GetPath
}{\void}
86 Returns actual path (set by
\helpref{ChangePathTo
}{wxfilesystemchangepathto
}).
89 \membersection{wxFileSystem::FindFirst
}\label{wxfilesystemfindfirst
}
91 \func{wxString
}{FindFirst
}{\param{const wxString\&
}{wildcard
},
\param{int
}{flags =
0}}
93 Works like
\helpref{wxFindFirstFile
}{wxfindfirstfile
}. Returns name of the first
94 filename (withing filesystem's current path) that matches
{\it wildcard
}.
{\it flags
} may be one of
95 wxFILE (only files), wxDIR (only directories) or
0 (both).
97 \membersection{wxFileSystem::FindNext
}\label{wxfilesystemfindnext
}
99 \func{wxString
}{FindNext
}{\void}
101 Returns next filename that matches parameters passed to
\helpref{FindFirst
}{wxfilesystemfindfirst
}.
104 \membersection{wxFileSystem::OpenFile
}\label{wxfilesystemopenfile
}
106 \func{wxFSFile*
}{OpenFile
}{\param{const wxString\&
}{location
}}
108 Opens file and returns pointer to
\helpref{wxFSFile
}{wxfsfile
} object
109 or NULL if failed. It first tries to open the file in relative scope
110 (based on value passed to ChangePathTo() method) and then as an