The Storage Kit: Find Directory

Derived from: (none)

Declared in: be/nustorage/FindDirectory.h

Library: libbe.so


Overview

The find_directory() function give you the path to pre-defined directories. These directories, such as those that store Be-supplied applications and user-defined preferences ssettings, are represented by directory_which constants. These constants are not strings; you can't use them directly. You have to pass them through find_directory().


Find Directory Functions


find_directory()


      status_t find_directory(directory_which which,
         dev_t volume,
         bool create_it,
         char *path_string,
         int32 length)

      status_t find_directory(directory_which which,
         BPath *path_obj,
         bool create_it = false,
         BVolume *volume = NULL)

The first version of the function can be used in straight C or C++ code. The second version is for C++ code only.

Finds the path to the directory symbolized by which and copies it into path_string, or uses it to initializes path_obj.

RETURN CODES

B_NO_ERROR. The directory was found.
Other errors. The directory wasn't found or couldn't be created.


Directory Constants


directory_which


      The directory_which constants are

B_DESKTOP_DIRECTORY
B_TRASH_DIRECTORY
B_APPS_DIRECTORY
B_PREFERENCES_DIRECTORY
B_BEOS_DIRECTORY
B_BEOS_SYSTEM_DIRECTORY
B_BEOS_ADDONS_DIRECTORY
B_BEOS_BOOT_DIRECTORY
B_BEOS_FONTS_DIRECTORY
B_BEOS_LIB_DIRECTORY
B_BEOS_SERVERS_DIRECTORY
B_BEOS_APPS_DIRECTORY
B_BEOS_BIN_DIRECTORY
B_BEOS_ETC_DIRECTORY
B_BEOS_DOCUMENTATION_DIRECTORY
B_BEOS_PREFERENCES_DIRECTORY
B_COMMON_DIRECTORY
B_COMMON_SYSTEM_DIRECTORY
B_COMMON_ADDONS_DIRECTORY
B_COMMON_BOOT_DIRECTORY
B_COMMON_FONTS_DIRECTORY
B_COMMON_LIB_DIRECTORY
B_COMMON_SERVERS_DIRECTORY
B_COMMON_BIN_DIRECTORY
B_COMMON_ETC_DIRECTORY
B_COMMON_DOCUMENTATION_DIRECTORY
B_COMMON_SETTINGS_DIRECTORY
B_COMMON_DEVELOP_DIRECTORY
B_COMMON_LOG_DIRECTORY
B_COMMON_SPOOL_DIRECTORY
B_COMMON_TEMP_DIRECTORY
B_COMMON_VAR_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





The Be Book, in lovely HTML, for the BeOS Preview Release.

Copyright © 1997 Be, Inc. All rights reserved.

Be is a registered trademark; BeOS, BeBox, BeWare, GeekPort, the Be logo, and the BeOS logo are trademarks of Be, Inc.

Last modified July 17, 1997.