mirror of
https://review.haiku-os.org/haiku
synced 2025-02-03 20:27:22 +01:00
986e4abce4
The new functions are meant to replace many uses of find_directory(): * find_paths() is supposed to be used when the directories of a certain kind in all installation directories are needed (e.g. font directories, add-on directory, etc.). Using this API makes code robust wrt addition or removal of installation locations. * find_path() is supposed to be used when files/directories associated with a loaded program, library, or add-on need to be found (e.g. data files or global settings). * find_path_for_path() is similar to find_path(), but it starts from a given path instead of an image.
36 lines
942 B
C
36 lines
942 B
C
/*
|
|
* Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _SYSTEM_FIND_DIRECTORY_PRIVATE_H
|
|
#define _SYSTEM_FIND_DIRECTORY_PRIVATE_H
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <FindDirectory.h>
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
|
status_t __find_directory(directory_which which, dev_t device, bool createIt,
|
|
char *returnedPath, int32 pathLength);
|
|
|
|
status_t __find_path(const void* codePointer, const char* dependency,
|
|
path_base_directory baseDirectory, const char* subPath, uint32 flags,
|
|
char* pathBuffer, size_t bufferSize);
|
|
|
|
status_t __find_path_for_path(const char* path, const char* dependency,
|
|
path_base_directory baseDirectory, const char* subPath, uint32 flags,
|
|
char* pathBuffer, size_t bufferSize);
|
|
|
|
status_t __find_paths(path_base_directory baseDirectory, const char* subPath,
|
|
uint32 flags, char*** _paths, size_t* _pathCount);
|
|
|
|
|
|
__END_DECLS
|
|
|
|
|
|
#endif /* _SYSTEM_FIND_DIRECTORY_PRIVATE_H */
|