]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/pathlist.tex
document that Remove(index) doesn't delete the window neither (replaces patch 1470834)
[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{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
32 Constructor.
33
34
35 \membersection{wxPathList::AddEnvList}\label{wxpathlistaddenvlist}
36
37 \func{void}{AddEnvList}{\param{const wxString\& }{env\_variable}}
38
39 Finds the value of the given environment variable, and adds all paths
40 to the path list. Useful for finding files in the PATH variable, for
41 example.
42
43
44 \membersection{wxPathList::Add}\label{wxpathlistadd}
45
46 \func{void}{Add}{\param{const wxString\& }{path}}
47
48 Adds the given directory to the path list, but does not
49 check 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
57 Given a full filename (with path), ensures that files in the same path
58 can be accessed using the pathlist. It does this by stripping the
59 filename 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
66 Searches for a full path for an existing file by appending {\it file} to
67 successive members of the path list. If the file wasn't found, an empty
68 string is returned.
69
70
71 \membersection{wxPathList::FindValidPath}\label{wxpathlistfindvalidpath}
72
73 \func{wxString}{FindValidPath}{\param{const wxString\& }{file}}
74
75 Searches for a full path for an existing file by appending {\it file} to
76 successive members of the path list. If the file wasn't found, an empty string
77 is 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
84 true if the path is in the path list (ignoring case).
85