History log of /haiku/headers/os/storage/FindDirectory.h
Revision Date Author Comments
# c237c4ce 08-Apr-2024 Alexander von Gluck <alex@terarocket.io>

finddir: Add SYSTEM_DESKBAR_DIRECTORY

* Resolves #18883

Change-Id: Ib971272319d55b37fa06d6874f257c8080bdab8f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7611
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 5e7964b0 03-May-2017 Alexander G. M. Smith <agmsmith@ncf.ca>

Remove Spurious B_BEOS_DATA_DIRECTORY

There is no DATA directory in BeOS, and its FindDir() doesn't implement
it. No need for a confusing backwards compatibility to something that
doesn't exist (had my hopes up, was going to move some non-executable
files from AddOns to Data in a program that works in BeOS and Haiku).

The removed enum label doesn't change the directory_which enum order
or count, as it was aliasing the value of another existing enum label
(B_SYSTEM_DATA_DIRECTORY).

Fixes #13470

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>


# b7a87fd1 26-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

find_paths_etc(): added user/system only flags.

* B_FIND_PATHS_(USER|SYSTEM)_ONLY cause only the specified paths
to be included in the result list.


# a30a4a41 18-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to Storage Kit classes.

No functional changes intended.

* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.


# 22e92014 18-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

s/B_FIND_PATH_IMAGE_PACKAGE_PATH/B_FIND_PATH_PACKAGE_PATH/

It doesn't only work for image files, so make the name more general.


# 60b39cd7 16-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add get_*architecture() API, extend find_path*() API

* Add get_architecture(), get_primary_architecture(),
get_secondary_architectures(), guess_architecture_for_path() to get
the caller's architecture, the primary architecture, all secondary
architectures, or the architecture associated with a specified path
respectively.
* Rename the find_path*() functions to find_path*_etc() and add an
optional architecture parameter. Add simplified find_path*()
functions.
* BPathFinder: Add FindPath[s]() versions with an architecture
parameter.


# 986e4abc 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add new API find_path[s](), find_path_for_path()

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.


# 635d2ac4 05-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add some missing B_USER_*_DIRECTORY constants


# 38fa81bf 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.


# 4b7e2196 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 3f85cfc1 24-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a few missing directory_which constants


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# aa56e459 20-Jun-2011 Jérôme Duval <korli@users.berlios.de>

revert r42251. Cast the enum to uint32 before use in switchs to please GCC 4.5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad1263fc 19-Jun-2011 Jérôme Duval <korli@users.berlios.de>

Part of patch from #6840:
* GCC 4.5 complains about switchs with cases not part of the directory_which enum
* Merge FSUtils directory_which values into the enum


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42251 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77a8a5cc 24-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* added B_COMMON_CACHE_DIRECTORY to find_directory()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40279 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 492dd892 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed /system/etc directory.
* /etc now points to /boot/common/etc/, and the remaining contents of the former
"etc" are put there now, as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33986 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 317bd7dd 03-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed directory structure as suggested on the mailing list.
* Made the TimeZoneView less error prone, and also actually use Haiku code (the
previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
update them yet, as we'll probably do so anyway at some point. Also, I think
we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1f3108a 10-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Scott:
Make sure the comments are C style in headers that are included by POSIX
headers.

Thanks! Should fix #2870.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63c96ae5 16-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added find directory constants B_{BEOS|COMMON|USER}_DATA_DIRECTORY, which
currently points to /etc for the system, and dedicated "data" directories
for common/user (the system directory should get a dedicated "data", too,
though).
* Added B_USER_CACHE_DIRECTORY (in config/cache).
* These additions were discussed some years ago, but I just had a good reason
to use them :-)
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09d84e61 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Changed StorageKit namespace to BPrivate::Storage
+ Changed Sniffer namespace to BPrivate::Storage::Sniffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82b75665 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated header guards to Be, Inc. style.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@713 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b7a87fd137abbe3798ef02639468782bf5bab808 26-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

find_paths_etc(): added user/system only flags.

* B_FIND_PATHS_(USER|SYSTEM)_ONLY cause only the specified paths
to be included in the result list.


# a30a4a41f948ebb03b95dab065a27a584ac0c97a 18-Jun-2014 John Scipione <jscipione@gmail.com>

Style fixes to Storage Kit classes.

No functional changes intended.

* Some variable renaming for clarity and consistency.
* Pointer style fixes.
* Added private method documentation back to cpp files for some methods.


# 22e92014f0dd38c0b621a94af3453a9e15b95609 18-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

s/B_FIND_PATH_IMAGE_PACKAGE_PATH/B_FIND_PATH_PACKAGE_PATH/

It doesn't only work for image files, so make the name more general.


# 60b39cd7416028e61e3d30bb3ba28bd3526e6001 16-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add get_*architecture() API, extend find_path*() API

* Add get_architecture(), get_primary_architecture(),
get_secondary_architectures(), guess_architecture_for_path() to get
the caller's architecture, the primary architecture, all secondary
architectures, or the architecture associated with a specified path
respectively.
* Rename the find_path*() functions to find_path*_etc() and add an
optional architecture parameter. Add simplified find_path*()
functions.
* BPathFinder: Add FindPath[s]() versions with an architecture
parameter.


# 986e4abce4efeccd9418eb8cdc7a710487f093b9 05-Nov-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add new API find_path[s](), find_path_for_path()

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.


# 635d2ac485786b0a69bed604bbbb64a6e2123018 05-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add some missing B_USER_*_DIRECTORY constants


# 38fa81bf8f0ccc37a615a9f5bd333f9b781322b3 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove B_COMMON*_DIRECTORY and kCommon*Directory constants

* This does intentionally break source compatibility, so that a review
of concerned code is forced.
* Binary compatibility should be maintained in most cases. The values
of the constants for the writable directories are now used for the
writable system directories. The values for the non-writable
directories are mapped to "/boot/system/data/empty/...", an empty or
non-existent directory, so that they will simply be skipped in search
paths. Only code that explicitly expects to find something in a
B_COMMON_* directory, will fail.


# 4b7e219688450694efc9d1890f83f816758c16d3 03-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove /boot/common for good

* Remove support for the "common" installation location from packagefs,
package kit, package daemon, package managers.
* Rename the B_COMMON_*_DIRECTORY constants referring to writable
directories to B_SYSTEM_*_DIRECTORY.
* Remove/adjust the use of various B_COMMON_*_DIRECTORY constants.
I'm sure some occurrence still remain. They can be adjusted when the
remaining B_COMMON_*_DIRECTORY constants are removed.


# 3f85cfc1322254c2be3b8ef4aa54ea39616e91ed 24-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add a few missing directory_which constants


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# aa56e459e04193abdd8da91e1eb283869233627b 20-Jun-2011 Jérôme Duval <korli@users.berlios.de>

revert r42251. Cast the enum to uint32 before use in switchs to please GCC 4.5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42266 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ad1263fce3f0d6df2d0ae8a15020fbf7606c989a 19-Jun-2011 Jérôme Duval <korli@users.berlios.de>

Part of patch from #6840:
* GCC 4.5 complains about switchs with cases not part of the directory_which enum
* Merge FSUtils directory_which values into the enum


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42251 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77a8a5cce3bc6c5e3cedc949f06dd1d2ce37ca05 24-Jan-2011 Oliver Tappe <zooey@hirschkaefer.de>

* added B_COMMON_CACHE_DIRECTORY to find_directory()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40279 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 492dd892ce90cc1dc4916eb54b656f04cc480ee6 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed /system/etc directory.
* /etc now points to /boot/common/etc/, and the remaining contents of the former
"etc" are put there now, as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33986 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 317bd7dda3eb26d4d24ba5b0a831461119f70d34 03-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed directory structure as suggested on the mailing list.
* Made the TimeZoneView less error prone, and also actually use Haiku code (the
previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
update them yet, as we'll probably do so anyway at some point. Also, I think
we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1f3108a60a7cebcd595c566b88627c99ba917af 10-Nov-2008 Stephan Aßmus <superstippi@gmx.de>

Patch by Scott:
Make sure the comments are C style in headers that are included by POSIX
headers.

Thanks! Should fix #2870.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63c96ae5a5771afe1be2683c0424e48511728ca5 16-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Added find directory constants B_{BEOS|COMMON|USER}_DATA_DIRECTORY, which
currently points to /etc for the system, and dedicated "data" directories
for common/user (the system directory should get a dedicated "data", too,
though).
* Added B_USER_CACHE_DIRECTORY (in config/cache).
* These additions were discussed some years ago, but I just had a good reason
to use them :-)
* Coding style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26990 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09d84e61b6c2629d253dce1e7d7e944943d3e40e 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Changed StorageKit namespace to BPrivate::Storage
+ Changed Sniffer namespace to BPrivate::Storage::Sniffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82b7566525184ba7b76dda94b7ad469a7a65b04c 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated header guards to Be, Inc. style.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@713 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96