1219974Smav/*
2219974Smav * Copyright 2013-2014 Haiku, Inc. All rights reserved.
3235092Smav * Distributed under the terms of the MIT License.
4219974Smav *
5219974Smav * Documentation by:
6219974Smav *		John Scipione, jscipione@gmail.com
7219974Smav *		Ingo Weinhold, ingo_weinhold@gmx.de
8219974Smav *
9219974Smav * Corresponds to:
10219974Smav *		headers/os/storage/PathFinder.h	 hrev47402
11219974Smav *		src/kits/storage/PathFinder.cpp	 hrev47402
12219974Smav */
13219974Smav
14219974Smav
15219974Smav/*!
16219974Smav	\file PathFinder.h
17219974Smav	\ingroup storage
18219974Smav	\ingroup libbe
19219974Smav	\brief Provides the BPathFinder class interface.
20219974Smav*/
21219974Smav
22219974Smav
23219974Smav/*!
24219974Smav	\class BPathFinder
25219974Smav	\ingroup storage
26219974Smav	\ingroup libbe
27219974Smav	\brief Helper class to retrieve paths in the file system layout.
28219974Smav
29219974Smav	The BPathFinder provides two sets of methods for retrieving paths:
30219974Smav	FindPath() for getting a single path in an installation location specified
31219974Smav	via a constructor or a SetTo() invocation, and the static FindPaths() for
32219974Smav	getting a list of paths for all installation locations.
33219974Smav
34219974Smav	\since Haiku R1
35219974Smav*/
36219974Smav
37219974Smav
38219974Smav/*!
39219974Smav	\fn BPathFinder::BPathFinder(const void* codePointer,
40219974Smav		const char* dependency)
41219974Smav	\brief Creates an object referring to an installation location based on a
42219974Smav	       loaded image file.
43219974Smav
44219974Smav	When initialized with this constructor a FindPath() method called afterward
45219974Smav	determines the path of the image (i.e. executable, library, or add-on) file
46219974Smav	associated with \a codePointer, a pointer to a location in the code or
47219974Smav	static data of an image loaded in the caller's team. Based on that path the
48219974Smav	path constant passed to FindPath() will be evaluated. In most cases that
49219974Smav	means first determining the path of the installation location from the path.
50219974Smav
51219974Smav	If \a dependency is specified, instead of determining the installation
52219974Smav	location path from the image path, the installation location path of the
53219974Smav	dependency \a dependency of the package containing the image file is used.
54219974Smav
55219974Smav	If the initialization fails, e.g. due to insufficient memory or invalid
56219974Smav	arguments, subsequent calls to FindPath() will return an error.
57219974Smav
58219974Smav	\param codePointer A pointer to code or static data belonging to the image
59219974Smav	       based on which FindPath() shall compute the path. The special value
60219974Smav	       \c B_APP_IMAGE_SYMBOL (the default) can be used to refer to the
61219974Smav	       program image, and \c B_CURRENT_IMAGE_SYMBOL for the caller's image.
62219974Smav	\param dependency The name of the package's "requires" entry to be used for
63219974Smav	       resolving the installation location. Can be \c NULL (the default).
64219974Smav
65219974Smav	\since Haiku R1
66219974Smav*/
67219974Smav
68230244Sjimharris
69230244Sjimharris/*!
70230244Sjimharris	\fn BPathFinder::BPathFinder(const char* path, const char* dependency)
71230244Sjimharris	\brief Creates an object referring to an installation location based on a
72219974Smav	       given \a path.
73219974Smav
74219974Smav	When initialized with this constructor a FindPath() method called afterward
75219974Smav	evaluates the path constant passed to it based on \a path. In most cases
76219974Smav	that means first determining the path of the installation location from the
77219974Smav	given \a path.
78219974Smav
79219974Smav	If \a dependency is specified, instead of determining the installation
80219974Smav	location path from the given path, the installation location path of the
81219974Smav	dependency \a dependency of the package containing the file referred to by
82219974Smav	\a path is used.
83219974Smav
84219974Smav	If the initialization fails, e.g. due to insufficient memory or invalid
85219974Smav	arguments, subsequent calls to FindPath() will return an error.
86219974Smav
87219974Smav	\param path A path based on which FindPath() shall compute the path.
88219974Smav	\param dependency The name of the package's "requires" entry to be used
89219974Smav	       for resolving the installation location. Can be \c NULL.
90219974Smav
91219974Smav	\since Haiku R1
92219974Smav*/
93219974Smav
94219974Smav
95219974Smav/*!
96219974Smav	\fn BPathFinder::BPathFinder(const entry_ref& ref, const char* dependency)
97219974Smav	\brief Creates an object referring to an installation location based on a
98219974Smav	       given entry_ref.
99219974Smav
100219974Smav	The constructor converts the given entry_ref \a ref to a path and then
101219974Smav	initializes the object like
102219974Smav	BPathFinder::BPathFinder(const char*, const char*).
103219974Smav
104219974Smav	\param ref A reference to be resolved to a path based on which FindPath()
105219974Smav	       shall compute the path.
106219974Smav	\param dependency The name of the package's "requires" entry to be used
107219974Smav	       for resolving the installation location. Can be \c NULL.
108219974Smav
109219974Smav	\see BPathFinder::BPathFinder(const char*, const char*)
110219974Smav
111219974Smav	\since Haiku R1
112219974Smav*/
113219974Smav
114219974Smav
115219974Smav/*!
116219974Smav	\fn BPathFinder::BPathFinder(const BResolvableExpression& expression,
117219974Smav		const char* dependency)
118230244Sjimharris	\brief Creates an object referring to an installation location based on
119230244Sjimharris	       the path of a package satisfying the given resolvable expression.
120219974Smav
121219974Smav	The constructor finds the latest package that satisfies the resolvable
122219974Smav	expression \a expression and then uses its path to initialize the object
123219974Smav	like BPathFinder::BPathFinder(const char*, const char*).
124219974Smav
125219974Smav	\note When using this constructor linking against libpackage.so is
126219974Smav	      required.
127219974Smav
128219974Smav	\param expression A resolvable expression to be resolved to the path of
129219974Smav	       the latest package satisfying it, based on which FindPath() shall
130219974Smav	       compute the path.
131219974Smav	\param dependency The name of the package's "requires" entry to be used
132219974Smav	       for resolving the installation location. Can be \c NULL.
133230244Sjimharris
134230244Sjimharris	\see BPathFinder::BPathFinder(const char*, const char*)
135230244Sjimharris
136219974Smav	\since Haiku R1
137219974Smav*/
138219974Smav
139219974Smav
140219974Smav/*!
141219974Smav	\fn status_t BPathFinder::SetTo(const void* codePointer,
142219974Smav		const char* dependency)
143219974Smav	\brief Reinitializes the object to refer to an installation location based
144219974Smav	       on a loaded image file.
145219974Smav
146219974Smav	When reinitialized with this method a FindPath() method called afterward
147219974Smav	determines the path of the image (i.e. executable, library, or add-on)
148219974Smav	file associated with \a codePointer, a pointer to a location in the code
149219974Smav	or static data of an image loaded in the caller's team. Based on that path
150219974Smav	the path constant passed to FindPath() will be evaluated. In most cases
151219974Smav	that means first determining the path of the installation location from
152219974Smav	the path.
153219974Smav
154219974Smav	If \a dependency is specified, instead of determining the installation
155219974Smav	location path from the image path, the installation location path of the
156219974Smav	dependency \a dependency of the package containing the image file is used.
157219974Smav
158219974Smav	If the initialization fails, e.g. due to insufficient memory or invalid
159219974Smav	arguments, this method and subsequent calls to FindPath() will return an
160219974Smav	error.
161219974Smav
162219974Smav	\param codePointer A pointer to code or static data belonging to the image
163219974Smav	       based on which FindPath() shall compute the path. The special value
164219974Smav	       \c B_APP_IMAGE_SYMBOL (the default) can be used to refer to the
165219974Smav	       program image, and \c B_CURRENT_IMAGE_SYMBOL for the caller's image.
166219974Smav	\param dependency The name of the package's "requires" entry to be used for
167219974Smav	       resolving the installation location. Can be \c NULL (the default).
168219974Smav
169219974Smav	\return A status code.
170219974Smav	\retval B_OK Everything went fine.
171219974Smav
172219974Smav	\since Haiku R1
173219974Smav*/
174219974Smav
175219974Smav
176219974Smav/*!
177219974Smav	\fn status_t BPathFinder::SetTo(const char* path, const char* dependency)
178219974Smav	\brief Reinitializes the object to refer to an installation location based
179219974Smav	       on a given \a path.
180219974Smav
181219974Smav	When reinitialized with this method a FindPath() method called afterward
182219974Smav	evaluates the path constant passed to it based on \a path. In most cases
183219974Smav	that means first determining the path of the installation location from
184219974Smav	the given \a path.
185219974Smav
186219974Smav	If \a dependency is specified, instead of determining the installation
187219974Smav	location path from the given path, the installation location path of the
188219974Smav	dependency \a dependency of the package containing the file referred to by
189219974Smav	\a path is used.
190219974Smav
191219974Smav	If the initialization fails, e.g. due to insufficient memory or invalid
192219974Smav	arguments, this method and subsequent calls to FindPath() will return an
193219974Smav	error.
194219974Smav
195219974Smav	\param path A path based on which FindPath() shall compute the path.
196219974Smav	\param dependency The name of the package's "requires" entry to be used for
197219974Smav	       resolving the installation location. Can be \c NULL.
198219974Smav
199219974Smav	\return \c B_OK Everything if went fine or an error code otherwise.
200219974Smav
201219974Smav	\since Haiku R1
202219974Smav*/
203219974Smav
204219974Smav
205219974Smav/*!
206219974Smav	\fn status_t BPathFinder::SetTo(const entry_ref& ref,
207219974Smav		const char* dependency)
208219974Smav	\brief Reinitializes the object to refer to an installation location based
209219974Smav	       on a given entry_ref.
210219974Smav
211219974Smav	This method converts the given entry_ref \a ref to a path and then calls
212219974Smav	calls BPathFinder::SetTo(const char*, const char*).
213219974Smav
214219974Smav	\param ref A reference to be resolved to a path based on which FindPath()
215219974Smav	       shall compute the path.
216219974Smav	\param dependency The name of the package's "requires" entry to be used
217219974Smav	       for resolving the installation location. Can be \c NULL.
218219974Smav
219219974Smav	\see status_t BPathFinder::SetTo(const char*, const char*)
220219974Smav
221219974Smav	\return \c B_OK Everything if went fine or an error code otherwise.
222219974Smav
223219974Smav	\since Haiku R1
224219974Smav*/
225219974Smav
226219974Smav
227219974Smav/*!
228219974Smav	\fn status_t BPathFinder::SetTo(const BResolvableExpression& expression,
229219974Smav		const char* dependency)
230219974Smav	\brief Reinitializes the object to refer to an installation location based
231219974Smav		on a given resolvable expression.
232219974Smav
233219974Smav	This method finds the latest package that satisfies the resolvable
234219974Smav	expression \a expression and then passes its path to
235219974Smav	BPathFinder::SetTo(const char*, const char*).
236219974Smav
237219974Smav	\note When using this method linking against libpackage.so is required.
238219974Smav
239219974Smav	\param expression A resolvable expression to be resolved to the path of the
240219974Smav		latest package satisfying it, based on which FindPath() shall compute
241219974Smav		the path.
242219974Smav	\param dependency The name of the package's "requires" entry to be used for
243219974Smav		resolving the installation location. Can be \c NULL.
244219974Smav
245219974Smav	\see status_t BPathFinder::SetTo(const char*, const char*)
246219974Smav
247219974Smav	\return \c B_OK Everything if went fine or an error code otherwise.
248219974Smav
249219974Smav	\since Haiku R1
250219974Smav*/
251219974Smav
252219974Smav
253219974Smav/*!
254219974Smav	\fn status_t BPathFinder::FindPath(const char* architecture,
255219974Smav		path_base_directory baseDirectory, const char* subPath, uint32 flags,
256219974Smav		BPath& _path)
257219974Smav	\brief Retrieves a path in the file system layout based.
258219974Smav
259219974Smav	Depending on how the object was initialized this method starts with a path
260219974Smav	(from an image file or as given) and based on it evaluates \a baseDirectory.
261219974Smav	In most cases that means first determining the path of the installation
262219974Smav	location from the path, then appending the relative path corresponding to
263230244Sjimharris	the given \a baseDirectory constant, and finally appending \a subPath, if
264230244Sjimharris	given.
265230244Sjimharris
266230244Sjimharris	If a dependency string was passed to the previous constructor or SetTo()
267230244Sjimharris	method, instead of determining the installation location path from the
268230244Sjimharris	initial path, the installation location path of the dependency of the
269230244Sjimharris	package containing the file the initial path refers to is used.
270230244Sjimharris
271230244Sjimharris	If \a baseDirectory specifies a path that is architecture dependent,
272219974Smav	\a architecture is used for constructing the path. If \a architecture is
273230244Sjimharris	\c NULL, the architecture associated with the initial path (as returned by
274230244Sjimharris	guess_architecture_for_path()) is used. Note that if an image was specified,
275230244Sjimharris	this is the same as the caller's architecture (as returned by
276230244Sjimharris	get_architecture()).
277230244Sjimharris
278230244Sjimharris	If \c B_FIND_PATH_IMAGE_PATH or \c B_FIND_PATH_PACKAGE_PATH are
279230244Sjimharris	specified, \a subPath is ignored. In the former case, which is only valid,
280230244Sjimharris	if an image was specified for initialization, \a dependency is ignored as
281230244Sjimharris	well and the path of the image file is returned. In the latter case the path
282230244Sjimharris	of the package containing the file the initial path refers to, respectively,
283230244Sjimharris	if \a dependency was specified, that of the package \a dependency was
284230244Sjimharris	resolved to is returned.
285230244Sjimharris
286230244Sjimharris	\param architecture The name of the architecture to be used for resolving
287230244Sjimharris	       \a architecture dependent paths. Can be \c NULL, in which case the
288230244Sjimharris	       \a architecture associated with the initial path is used.
289230244Sjimharris	\param baseDirectory Constant indicating which path to retrieve.
290230244Sjimharris	\param subPath Relative subpath that shall be appended. Can be \c NULL.
291230244Sjimharris	\param flags Bitwise OR of any of the following flags:
292230244Sjimharris	       - \c B_FIND_PATH_CREATE_DIRECTORY: If the resulting path doesn't
293230244Sjimharris	         exist, create it as a directory (including all missing ancestors).
294230244Sjimharris	       - \c B_FIND_PATH_CREATE_PARENT_DIRECTORY: If the resulting path's
295230244Sjimharris	         parent doesn't exist, create the parent directory (including all
296230244Sjimharris	         missing ancestors).
297230244Sjimharris	       - \c B_FIND_PATH_EXISTING_ONLY: If the resulting path doesn't exist,
298230244Sjimharris	         fail with \c B_ENTRY_NOT_FOUND.
299230244Sjimharris	\param _path The variable to be set to the resulting path on success.
300230244Sjimharris
301230244Sjimharris	\return A status code.
302230244Sjimharris	\retval B_OK Everything went fine.
303230244Sjimharris	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
304230244Sjimharris	        path didn't exist, e.g. \c B_FIND_PATH_PACKAGE_PATH was specified
305230244Sjimharris	        and the image file didn't belong to a package, or \c dependency
306230244Sjimharris	        was specified, but wasn't a "requires" entry of the package, or
307230244Sjimharris	        \c B_FIND_PATH_EXISTING_ONLY was specified and the resulting path
308230244Sjimharris	        didn't exist.
309230244Sjimharris
310230244Sjimharris	\since Haiku R1
311230244Sjimharris*/
312230244Sjimharris
313230244Sjimharris
314230244Sjimharris/*!
315230244Sjimharris	\fn status_t BPathFinder::FindPath(path_base_directory baseDirectory,
316230244Sjimharris		const char* subPath, uint32 flags, BPath& _path)
317230244Sjimharris	\brief Retrieves a path in the file system layout based.
318230244Sjimharris
319230244Sjimharris	Equivalent to a call to BPathFinder::FindPath(const char*,
320230244Sjimharris	path_base_directory, const char*, uint32, BPath&) with a \c NULL
321230244Sjimharris	architecture.
322230244Sjimharris
323230244Sjimharris	\param baseDirectory Constant indicating which path to retrieve.
324230244Sjimharris	\param subPath Relative subpath that shall be appended. Can be \c NULL.
325230244Sjimharris	\param flags Bitwise OR of any of the following flags:
326230244Sjimharris	       - \c B_FIND_PATH_CREATE_DIRECTORY: If the resulting path doesn't
327230244Sjimharris	         exist, create it as a directory (including all missing ancestors).
328230244Sjimharris	       - \c B_FIND_PATH_CREATE_PARENT_DIRECTORY: If the resulting path's
329230244Sjimharris	         parent doesn't exist, create the parent directory (including all
330230244Sjimharris	         missing ancestors).
331230244Sjimharris	       - \c B_FIND_PATH_EXISTING_ONLY: If the resulting path doesn't exist,
332230244Sjimharris	         fail with \c B_ENTRY_NOT_FOUND.
333230244Sjimharris	\param _path The variable to be set to the resulting path on success.
334230244Sjimharris
335230244Sjimharris	\return A status code.
336230244Sjimharris	\retval B_OK Everything went fine.
337230244Sjimharris	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
338230244Sjimharris	        path didn't exist, e.g. \c B_FIND_PATH_PACKAGE_PATH was specified
339230244Sjimharris	        and the image file didn't belong to a package, or \c dependency
340219974Smav	        was specified, but wasn't a "requires" entry of the package, or
341219974Smav	        \c B_FIND_PATH_EXISTING_ONLY was specified and the resulting path
342219974Smav	        didn't exist.
343219974Smav
344219974Smav	\since Haiku R1
345219974Smav*/
346219974Smav
347219974Smav
348219974Smav/*!
349219974Smav	\fn status_t BPathFinder::FindPath(path_base_directory baseDirectory,
350219974Smav		const char* subPath, BPath& _path)
351219974Smav	\brief Retrieves a path in the file system layout based.
352219974Smav
353219974Smav	Equivalent to a call to BPathFinder::FindPath(const char*,
354219974Smav	path_base_directory, const char*, uint32, BPath&) with a \c NULL
355219974Smav	architecture and 0 flags.
356219974Smav
357219974Smav	\param baseDirectory Constant indicating which path to retrieve.
358219974Smav	\param subPath Relative subpath that shall be appended. Can be \c NULL.
359230244Sjimharris	\param _path The variable to be set to the resulting path on success.
360219974Smav
361230244Sjimharris	\return A status code.
362219974Smav	\retval B_OK Everything went fine.
363230244Sjimharris	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
364219974Smav		path didn't exist, e.g. \c B_FIND_PATH_PACKAGE_PATH was specified
365219974Smav		and the image file didn't belong to a package, or \c dependency was
366219974Smav		specified, but wasn't a "requires" entry of the package.
367219974Smav*/
368219974Smav
369219974Smav
370219974Smav/*!
371219974Smav	\fn status_t BPathFinder::FindPath(path_base_directory baseDirectory,
372219974Smav		BPath& _path)
373219974Smav	\brief Retrieves a path in the file system layout based.
374230244Sjimharris
375219974Smav	Equivalent to a call to BPathFinder::FindPath(const char*,
376219974Smav	path_base_directory, const char*, uint32, BPath&) with a \c NULL
377219974Smav	architecture, 0 flags, and \c NULL subpath.
378219974Smav
379219974Smav	\param baseDirectory Constant indicating which path to retrieve.
380219974Smav	\param _path The variable to be set to the resulting path on success.
381219974Smav	\return A status code.
382219974Smav	\retval B_OK Everything went fine.
383219974Smav	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
384230244Sjimharris	        path didn't exist, e.g. \c B_FIND_PATH_PACKAGE_PATH was specified
385219974Smav	        and the image file didn't belong to a package, or \c dependency
386230244Sjimharris	        was specified, but wasn't a "requires" entry of the package.
387219974Smav
388230244Sjimharris	\since Haiku R1
389219974Smav*/
390219974Smav
391219974Smav
392219974Smav/*!
393219974Smav	\fn status_t BPathFinder::FindPaths(const char* architecture,
394219974Smav		path_base_directory baseDirectory, const char* subPath, uint32 flags,
395219974Smav		BStringList& _paths)
396219974Smav	\brief Retrieves a list of paths in the file system layout.
397219974Smav
398219974Smav	For each installation location -- in the order most specific to most
399219974Smav	generic, non-packaged before packaged -- the function evaluates
400219974Smav	\a baseDirectory to a path and appends \a subPath, if given.
401219974Smav
402219974Smav	If \a baseDirectory specifies a path that is architecture dependent,
403219974Smav	\a architecture is used for constructing each path. If \a architecture is
404219974Smav	\c NULL, the caller's architecture (as returned by get_architecture()) is
405219974Smav	used.
406219974Smav
407219974Smav	\c B_FIND_PATH_PACKAGE_PATH and \c B_FIND_PATH_IMAGE_PATH are not
408219974Smav	valid arguments for this function.
409219974Smav
410219974Smav	\param architecture The name of the architecture to be used for resolving
411219974Smav	       \a architecture dependent paths. Can be \c NULL, in which case the
412219974Smav	       caller's \a architecture is used.
413219974Smav	\param baseDirectory Constant indicating which paths to retrieve.
414219974Smav	\param subPath Relative subpath that shall be appended. Can be \c NULL.
415219974Smav	\param flags Bitwise OR of any of the following flags:
416219974Smav	       - \c B_FIND_PATH_CREATE_DIRECTORY: If a resulting path doesn't
417219974Smav	         exist, create it as a directory (including all missing ancestors).
418219974Smav	       - \c B_FIND_PATH_CREATE_PARENT_DIRECTORY: If a resulting path's
419219974Smav	         parent doesn't exist, create the parent directory (including all
420219974Smav	         missing ancestors).
421219974Smav	       - \c B_FIND_PATH_EXISTING_ONLY: If a resulting path doesn't exist,
422219974Smav	         skip it. If none of the paths exist, fail with \c B_ENTRY_NOT_FOUND.
423219974Smav	\param _paths The BStringList variable where the retrieved paths shall be
424219974Smav	       stored. The list is emptied before adding the paths. It is also
425219974Smav	       emptied on error.
426219974Smav
427219974Smav	\return A status code.
428219974Smav	\retval B_OK Everything went fine.
429219974Smav	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
430219974Smav	        paths didn't exist, e.g. \c B_FIND_PATH_EXISTING_ONLY was
431219974Smav	        specified and none of the resulting paths existed.
432219974Smav
433219974Smav	\since Haiku R1
434219974Smav*/
435219974Smav
436219974Smav
437219974Smav/*!
438219974Smav	\fn status_t BPathFinder::FindPaths(path_base_directory baseDirectory,
439219974Smav		const char* subPath, uint32 flags, BStringList& _paths)
440219974Smav	\brief Retrieves a list of paths in the file system layout.
441219974Smav
442219974Smav	Equivalent to a call to BPathFinder::FindPaths(const char*,
443219974Smav	path_base_directory, const char*, uint32, BStringList&) with a \c NULL
444219974Smav	architecture.
445219974Smav
446219974Smav	\param baseDirectory Constant indicating which paths to retrieve.
447219974Smav	\param subPath Relative subpath that shall be appended. Can be \c NULL.
448219974Smav	\param flags Bitwise OR of any of the following flags:
449219974Smav	       - \c B_FIND_PATH_CREATE_DIRECTORY: If a resulting path doesn't
450219974Smav	         exist, create it as a directory (including all missing ancestors).
451219974Smav	       - \c B_FIND_PATH_CREATE_PARENT_DIRECTORY: If a resulting path's
452219974Smav	         parent doesn't exist, create the parent directory (including all
453219974Smav	         missing ancestors).
454219974Smav	       - \c B_FIND_PATH_EXISTING_ONLY: If a resulting path doesn't exist,
455219974Smav	         skip it. If none of the paths exist, fail with
456219974Smav	         \c B_ENTRY_NOT_FOUND.
457219974Smav	\param _paths The BStringList variable where the retrieved paths shall be
458219974Smav	       stored. The list is emptied before adding the paths. It is also
459219974Smav	       emptied on error.
460219974Smav
461219974Smav	\return A status code.
462219974Smav	\retval B_OK Everything went fine.
463219974Smav	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
464219974Smav	        paths didn't exist, e.g. \c B_FIND_PATH_EXISTING_ONLY was specified
465219974Smav	        and none of the resulting paths existed.
466219974Smav
467219974Smav	\since Haiku R1
468219974Smav*/
469219974Smav
470219974Smav
471219974Smav/*!
472219974Smav	\fn status_t BPathFinder::FindPaths(path_base_directory baseDirectory,
473219974Smav		const char* subPath, BStringList& _paths)
474219974Smav	\brief Retrieves a list of paths in the file system layout.
475219974Smav
476219974Smav	Equivalent to a call to BPathFinder::FindPaths(const char*,
477219974Smav	path_base_directory, const char*, uint32, BStringList&) with a \c NULL
478219974Smav	architecture and 0 flags.
479219974Smav
480219974Smav	\param baseDirectory Constant indicating which paths to retrieve.
481219974Smav	\param subPath Relative subpath that shall be appended. Can be \c NULL.
482219974Smav	\param _paths The BStringList variable where the retrieved paths shall be
483219974Smav	       stored. The list is emptied before adding the paths. It is also
484219974Smav	       emptied on error.
485219974Smav
486219974Smav	\return A status code.
487219974Smav	\retval B_OK Everything went fine.
488219974Smav	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
489219974Smav	        paths didn't exist, e.g. \c B_FIND_PATH_EXISTING_ONLY was specified
490219974Smav	        and none of the resulting paths existed.
491219974Smav
492219974Smav	\since Haiku R1
493219974Smav*/
494219974Smav
495219974Smav
496219974Smav/*!
497219974Smav	\fn status_t BPathFinder::FindPaths(path_base_directory baseDirectory,
498219974Smav		BStringList& _paths)
499219974Smav	\brief Retrieves a list of paths in the file system layout.
500219974Smav
501219974Smav	Equivalent to a call to BPathFinder::FindPaths(const char*,
502219974Smav	path_base_directory, const char*, uint32, BStringList&) with a \c NULL
503219974Smav	architecture, 0 flags, and \c NULL subpath.
504219974Smav
505219974Smav	\param baseDirectory Constant indicating which paths to retrieve.
506219974Smav	\param _paths The BStringList variable where the retrieved paths shall be
507219974Smav	       stored. The list is emptied before adding the paths. It is also
508219974Smav	       emptied on error.
509219974Smav
510219974Smav	\return A status code.
511219974Smav	\retval B_OK Everything went fine.
512219974Smav	\retval B_ENTRY_NOT_FOUND A file system entry required for retrieving the
513219974Smav	        paths didn't exist, e.g. \c B_FIND_PATH_EXISTING_ONLY was specified
514219974Smav	        and none of the resulting paths existed.
515219974Smav
516219974Smav	\since Haiku R1
517219974Smav*/
518219974Smav