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