1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxFileLocator documentation
4 %% Author: Vadim Zeitlin
8 %% Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
9 %% License: wxWidgets license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxFileLocator
}}\label{wxfilelocator
}
14 wxFileLocator returns the standard locations in the file system and should be
15 used by the programs to find their data files in a portable way.
17 Please note that this is not a real class because object of this type are never
18 created but more a namespace containing the class methods which are all static,
19 so to use wxFileLocator simply call its methods directly.
21 In the description of the methods below, the example return values are given
22 for the Unix, Windows and Mac OS X systems, however please note that these are
23 just the examples and the actual values may differ. Most importantly:
25 \item Unix:
\texttt{/usr
} should in general be replaced by the
26 program installation prefix which is by default
\texttt{/usr/local
} but
27 may be any other path as well.
28 \item Windows: the system administrator may change the standard
29 directories locations, i.e. the Windows directory may be named
30 \texttt{W:$
\backslash$Win2003
} instead of default
31 \texttt{C:$
\backslash$Windows
}
34 The strings
\texttt{\textit{appname
}} and
\texttt{\textit{username
}} should be
35 replaced with the value returned by
\helpref{wxApp::GetAppName
}{wxappgetappname
}
36 and the name of the currently logged in user, respectively.
38 The directories returned by the methods of this class may or may not exist. If
39 they don't exist, it's up to the caller to create them, wxFileLocator doesn't
42 Finally note that under Mac, these functions only work for the bundled
45 \wxheading{Derived from
}
49 \wxheading{Include files
}
54 \latexignore{\rtfignore{\wxheading{Members
}}}
57 \membersection{wxFileLocator::GetConfigDir
}\label{wxfilelocatorgetconfigdir
}
59 \func{static wxString
}{GetConfigDir
}{\void}
61 Return the directory containing the system config files.
63 Example return values:
65 \item Unix:
\texttt{/etc
}
66 \item Windows:
\texttt{C:$
\backslash$Windows
}
67 \item Mac:
\texttt{/Library/Preferences
}
72 \helpref{wxFileConfig
}{wxfileconfig
}
75 \membersection{wxFileLocator::GetDataDir
}\label{wxfilelocatorgetdatadir
}
77 \func{static wxString
}{GetDataDir
}{\void}
79 Return the location of the applications global, i.e. not user-specific,
82 Example return values:
84 \item Unix:
\texttt{/usr/share/
\textit{appname
}}
85 \item Windows:
\texttt{C:$
\backslash$Program Files$
\backslash$
\textit{appname
}}
86 \item Mac:
\texttt{\textit{appname
}.app/Contents
} bundle subdirectory
91 \helpref{GetLocalDataDir
}{wxfilelocatorgetlocaldatadir
}
94 \membersection{wxFileLocator::GetLocalDataDir
}\label{wxfilelocatorgetlocaldatadir
}
96 \func{static wxString
}{GetLocalDataDir
}{\void}
98 Return the location for application data files which are host-specific and
99 can't, or shouldn't, be shared with the other machines.
101 This is the same as
\helpref{GetDataDir()
}{wxfilelocatorgetdatadir
} except
102 under Unix where it returns
\texttt{/etc/
\textit{appname
}}.
105 \membersection{wxFileLocator::GetPluginsDir
}\label{wxfilelocatorgetpluginsdir
}
107 \func{static wxString
}{GetPluginsDir
}{\void}
109 Return the directory where the loadable modules (plugins) live.
111 Example return values:
113 \item Unix:
\texttt{/usr/lib/
\textit{appname
}}
114 \item Windows: the directory of the executable file
115 \item Mac:
\texttt{\textit{appname
}.app/Contents/Plugins
} bundle subdirectory
120 \helpref{wxDynamicLibrary
}{wxdynamiclibrary
}
123 \membersection{wxFileLocator::GetUserConfigDir
}\label{wxfilelocatorgetuserconfigdir
}
125 \func{static wxString
}{GetUserConfigDir
}{\void}
127 Return the directory for the user config files:
129 \item Unix:
\texttt{\verb|~|
} (the home directory)
130 \item Windows:
\texttt{C:$
\backslash$Documents and Settings$
\backslash$
\textit{username
}}
131 \item Mac:
\texttt{\verb|~|/Library/Preferences
}
134 Only use this method if you have a single configuration file to put in this
135 directory, otherwise
\helpref{GetUserDataDir()
}{wxfilelocatorgetuserdatadir
} is
139 \membersection{wxFileLocator::GetUserDataDir
}\label{wxfilelocatorgetuserdatadir
}
141 \func{static wxString
}{GetUserDataDir
}{\void}
143 Return the directory for the user-dependent application data files:
145 \item Unix:
\texttt{\verb|~|/.
\textit{appname
}}
146 \item Windows:
\texttt{C:$
\backslash$Documents and Settings$
\backslash$
\textit{username
}
147 $
\backslash$Application Data
148 $
\backslash$
\textit{appname
}}
149 \item Mac:
\texttt{\verb|~|/Library/
\textit{appname
}}
153 \membersection{wxFileLocator::GetUserLocalDataDir
}\label{wxfilelocatorgetuserlocaldatadir
}
155 \func{static wxString
}{GetUserLocalDataDir
}{\void}
157 Return the directory for user data files which shouldn't be shared with
160 This is the same as
\helpref{GetUserDataDir()
}{wxfilelocatorgetuserdatadir
} for
161 all platforms except Windows where it returns
162 \texttt{C:$
\backslash$Documents and Settings$
\backslash$
\textit{username
}
163 $
\backslash$Local Settings
164 $
\backslash$Application Data
165 $
\backslash$
\textit{appname
}}