Documentation | StorageKit | FindDirectory
SYNOPSIS
Perl
use HaikuR1::FindDirectory qw(find_directory B_DESKTOP_DIRECTORY); my $path = find_directory(B_DESKTOP_DIRECTORY)
Python
from HaikuR1.StorageKit import find_directory, B_DESKTOP_DIRECTORY path = find_directory(B_DESKTOP_DIRECTORY)
Python
Note that FindDirectory
does not actually exist as a submodule; instead,
the constants are imported from StorageKit
.
DESCRIPTION
Exposes the find_directory function and constants
For more information on FindDirectory, see the Haiku Book description.
FUNCTIONS
find_directory
Returns the path for the given directory constant.
Perl
find_directory($which, $createIt, $volume);
Python
find_directory(which, createIt, volume)
which
An integer, one of the directory constants.
createIt
A boolean; if true, the directory in question will be created if it does not already exist; defaults to false. (Note that this will not work for directories provided by packages.)
volume
A Volume object; if not provided, will use the boot volume.
CONSTANTS
Directories
Perl
use HaikuR1::FindDirectory qw(:directory_which)
Python
Python does not support export tags.
- B_DESKTOP_DIRECTORY
- B_TRASH_DIRECTORY
- B_SYSTEM_DIRECTORY
- B_SYSTEM_ADDONS_DIRECTORY
- B_SYSTEM_BOOT_DIRECTORY
- B_SYSTEM_FONTS_DIRECTORY
- B_SYSTEM_LIB_DIRECTORY
- B_SYSTEM_SERVERS_DIRECTORY
- B_SYSTEM_APPS_DIRECTORY
- B_SYSTEM_BIN_DIRECTORY
- B_SYSTEM_DOCUMENTATION_DIRECTORY
- B_SYSTEM_PREFERENCES_DIRECTORY
- B_SYSTEM_TRANSLATORS_DIRECTORY
- B_SYSTEM_MEDIA_NODES_DIRECTORY
- B_SYSTEM_SOUNDS_DIRECTORY
- B_SYSTEM_DATA_DIRECTORY
- B_SYSTEM_DEVELOP_DIRECTORY
- B_SYSTEM_PACKAGES_DIRECTORY
- B_SYSTEM_HEADERS_DIRECTORY
- B_SYSTEM_ETC_DIRECTORY
- B_SYSTEM_SETTINGS_DIRECTORY
- B_SYSTEM_LOG_DIRECTORY
- B_SYSTEM_SPOOL_DIRECTORY
- B_SYSTEM_TEMP_DIRECTORY
- B_SYSTEM_VAR_DIRECTORY
- B_SYSTEM_CACHE_DIRECTORY
- B_SYSTEM_NONPACKAGED_DIRECTORY
- B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY
- B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY
- B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY
- B_SYSTEM_NONPACKAGED_BIN_DIRECTORY
- B_SYSTEM_NONPACKAGED_DATA_DIRECTORY
- B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY
- B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY
- B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY
- B_SYSTEM_NONPACKAGED_LIB_DIRECTORY
- B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY
- B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY
- B_USER_DIRECTORY
- B_USER_CONFIG_DIRECTORY
- B_USER_ADDONS_DIRECTORY
- B_USER_BOOT_DIRECTORY
- B_USER_FONTS_DIRECTORY
- B_USER_LIB_DIRECTORY
- B_USER_SETTINGS_DIRECTORY
- B_USER_DESKBAR_DIRECTORY
- B_USER_PRINTERS_DIRECTORY
- B_USER_TRANSLATORS_DIRECTORY
- B_USER_MEDIA_NODES_DIRECTORY
- B_USER_SOUNDS_DIRECTORY
- B_USER_DATA_DIRECTORY
- B_USER_CACHE_DIRECTORY
- B_USER_PACKAGES_DIRECTORY
- B_USER_HEADERS_DIRECTORY
- B_USER_NONPACKAGED_DIRECTORY
- B_USER_NONPACKAGED_ADDONS_DIRECTORY
- B_USER_NONPACKAGED_TRANSLATORS_DIRECTORY
- B_USER_NONPACKAGED_MEDIA_NODES_DIRECTORY
- B_USER_NONPACKAGED_BIN_DIRECTORY
- B_USER_NONPACKAGED_DATA_DIRECTORY
- B_USER_NONPACKAGED_FONTS_DIRECTORY
- B_USER_NONPACKAGED_SOUNDS_DIRECTORY
- B_USER_NONPACKAGED_DOCUMENTATION_DIRECTORY
- B_USER_NONPACKAGED_LIB_DIRECTORY
- B_USER_NONPACKAGED_HEADERS_DIRECTORY
- B_USER_NONPACKAGED_DEVELOP_DIRECTORY
- B_USER_DEVELOP_DIRECTORY
- B_USER_DOCUMENTATION_DIRECTORY
- B_USER_SERVERS_DIRECTORY
- B_USER_APPS_DIRECTORY
- B_USER_BIN_DIRECTORY
- B_USER_PREFERENCES_DIRECTORY
- B_USER_ETC_DIRECTORY
- B_USER_LOG_DIRECTORY
- B_USER_SPOOL_DIRECTORY
- B_USER_VAR_DIRECTORY
- B_APPS_DIRECTORY
- B_PREFERENCES_DIRECTORY
- B_UTILITIES_DIRECTORY
- B_PACKAGE_LINKS_DIRECTORY
find_path_flags
Perl
use HaikuR1::FindDirectory qw(:find_path_flags)
Python
Python does not support export tags.
- B_FIND_PATH_CREATE_DIRECTORY
- B_FIND_PATH_CREATE_PARENT_DIRECTORY
- B_FIND_PATH_EXISTING_ONLY
- B_FIND_PATHS_SYSTEM_ONLY
- B_FIND_PATHS_USER_ONLY
path_base_directory
Perl
use HaikuR1::FindDirectory qw(:path_base_directory)
Python
Python does not support export tags.
- B_FIND_PATH_INSTALLATION_LOCATION_DIRECTORY
- B_FIND_PATH_ADD_ONS_DIRECTORY
- B_FIND_PATH_APPS_DIRECTORY
- B_FIND_PATH_BIN_DIRECTORY
- B_FIND_PATH_BOOT_DIRECTORY
- B_FIND_PATH_CACHE_DIRECTORY
- B_FIND_PATH_DATA_DIRECTORY
- B_FIND_PATH_DEVELOP_DIRECTORY
- B_FIND_PATH_DEVELOP_LIB_DIRECTORY
- B_FIND_PATH_DOCUMENTATION_DIRECTORY
- B_FIND_PATH_ETC_DIRECTORY
- B_FIND_PATH_FONTS_DIRECTORY
- B_FIND_PATH_HEADERS_DIRECTORY
- B_FIND_PATH_LIB_DIRECTORY
- B_FIND_PATH_LOG_DIRECTORY
- B_FIND_PATH_MEDIA_NODES_DIRECTORY
- B_FIND_PATH_PACKAGES_DIRECTORY
- B_FIND_PATH_PREFERENCES_DIRECTORY
- B_FIND_PATH_SERVERS_DIRECTORY
- B_FIND_PATH_SETTINGS_DIRECTORY
- B_FIND_PATH_SOUNDS_DIRECTORY
- B_FIND_PATH_SPOOL_DIRECTORY
- B_FIND_PATH_TRANSLATORS_DIRECTORY
- B_FIND_PATH_VAR_DIRECTORY
- B_FIND_PATH_IMAGE_PATH
- B_FIND_PATH_PACKAGE_PATH