wxWidgets/docs/latex/wx/pathlist.tex

76 lines
2.3 KiB
TeX
Raw Normal View History

\section{\class{wxPathList}}\label{wxpathlist}
The path list is a convenient way of storing a number of directories, and
when presented with a filename without a directory, searching for an existing file
in those directories. Storing the filename only in an application's files and
using a locally-defined list of directories makes the application and its files more
portable.
Use the {\it wxFileNameFromPath} global function to extract the filename
from the path.
\wxheading{Derived from}
\helpref{wxList}{wxlist}\\
\helpref{wxObject}{wxobject}
\wxheading{See also}
\helpref{wxList}{wxlist}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxPathList::wxPathList}
\func{}{wxPathList}{\void}
Constructor.
\membersection{wxPathList::AddEnvList}
\func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}}
Finds the value of the given environment variable, and adds all paths
to the path list. Useful for finding files in the PATH variable, for
example.
\membersection{wxPathList::Add}
\func{void}{Add}{\param{const wxString\& }{path}}
Adds the given directory to the path list, but does not
check if the path was already on the list (use wxPathList::Member)
for this).
\membersection{wxPathList::EnsureFileAccessible}
\func{void}{EnsureFileAccessible}{\param{const wxString\& }{filename}}
Given a full filename (with path), ensures that files in the same path
can be accessed using the pathlist. It does this by stripping the
filename and adding the path to the list if not already there.
\membersection{wxPathList::FindAbsoluteValidPath}
\func{wxString}{FindAbsoluteValidPath}{\param{const wxString\& }{file}}
Searches for a full path for an existing file by appending {\it file} to
successive members of the path list. If the file exists, a temporary
pointer to the absolute path is returned.
\membersection{wxPathList::FindValidPath}
\func{wxString}{FindValidPath}{\param{const wxString\& }{file}}
Searches for a full path for an existing file by appending {\it file} to
successive members of the path list. If the file exists, a temporary
pointer to the full path is returned. This path may be relative to the current
working directory.
\membersection{wxPathList::Member}
\func{bool}{Member}{\param{const wxString\& }{file}}
TRUE if the path is in the path list (ignoring case).