]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/pathlist.tex
wxPROCESS_ENTER is deprecated in favour of wxTE_PROCESS_ENTER. So use the latter...
[wxWidgets.git] / docs / latex / wx / pathlist.tex
... / ...
CommitLineData
1\section{\class{wxPathList}}\label{wxpathlist}
2
3The path list is a convenient way of storing a number of directories, and
4when presented with a filename without a directory, searching for an existing file
5in those directories. Storing the filename only in an application's files and
6using a locally-defined list of directories makes the application and its files more
7portable.
8
9Use the {\it wxFileNameFromPath} global function to extract the filename
10from the path.
11
12\wxheading{Derived from}
13
14\helpref{wxList}{wxlist}\\
15\helpref{wxObject}{wxobject}
16
17\wxheading{Include files}
18
19<wx/filefn.h>
20
21\wxheading{See also}
22
23\helpref{wxList}{wxlist}
24
25\latexignore{\rtfignore{\wxheading{Members}}}
26
27
28\membersection{wxPathList::wxPathList}\label{wxpathlistctor}
29
30\func{}{wxPathList}{\void}
31
32Constructor.
33
34
35\membersection{wxPathList::AddEnvList}\label{wxpathlistaddenvlist}
36
37\func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}}
38
39Finds the value of the given environment variable, and adds all paths
40to the path list. Useful for finding files in the PATH variable, for
41example.
42
43
44\membersection{wxPathList::Add}\label{wxpathlistadd}
45
46\func{void}{Add}{\param{const wxString\& }{path}}
47
48Adds the given directory to the path list, but does not
49check if the path was already on the list (use
50\helpref{wxPathList::Member()}{wxpathlistmember} for this).
51
52
53\membersection{wxPathList::EnsureFileAccessible}\label{wxpathlistensurefileaccessible}
54
55\func{void}{EnsureFileAccessible}{\param{const wxString\& }{filename}}
56
57Given a full filename (with path), ensures that files in the same path
58can be accessed using the pathlist. It does this by stripping the
59filename and adding the path to the list if not already there.
60
61
62\membersection{wxPathList::FindAbsoluteValidPath}\label{wxpathlistfindabsolutepath}
63
64\func{wxString}{FindAbsoluteValidPath}{\param{const wxString\& }{file}}
65
66Searches for a full path for an existing file by appending {\it file} to
67successive members of the path list. If the file wasn't found, an empty
68string is returned.
69
70
71\membersection{wxPathList::FindValidPath}\label{wxpathlistfindvalidpath}
72
73\func{wxString}{FindValidPath}{\param{const wxString\& }{file}}
74
75Searches for a full path for an existing file by appending {\it file} to
76successive members of the path list. If the file wasn't found, an empty string
77is returned. This path may be relative to the current working directory.
78
79
80\membersection{wxPathList::Member}\label{wxpathlistmember}
81
82\func{bool}{Member}{\param{const wxString\& }{file}}
83
84true if the path is in the path list (ignoring case).
85