Declared in: be/storage/StorageDefs.h
| Constant | Meaning |
|---|---|
B_FILE_NAME_LENGTH | Number of characters allowed in a file name. |
B_PATH_NAME_LENGTH | Number of characters allowed in a path name. |
B_ATTR_NAME_LENGTH | Number of characters allowed in an attribute name. |
B_MIME_TYPE_LENGTH | Number of characters allowed in a MIME type name. |
B_MAX_SYMLINKS | Number of nested symlinks allowed. |
These constants define the maximum values for several Storage Kit related
items, including file and path name strings, attribute name strings, and
MIME type strings. B_MAX_SYMLINKS specifies how many symbolic links may
be linked through each other.
Declared in: be/storage/StorageDefs.h
| Constant | Meaning |
|---|---|
B_READ_ONLY | Open the file with read-only access. |
B_WRITE_ONLY | Open the file with write-only access. |
B_READ_WRITE | Open the file for both reading and writing. |
B_FAIL_IF_EXISTS | Don't open the file if it already exists. |
B_CREATE_FILE | Create the file before opening it. |
B_ERASE_FILE | Erase the previous contents before opening the file. |
B_OPEN_AT_END | Open with the pointer at the end of the file. |
These constants are used when opening files using either the POSIX open()
function or using the
BFile class. They specify the mode in which the
file is to be opened. For instance, if write-only access is desired, and
you want the operation to fail if the file exists, you would do the
following:
fd=open("foobar.data",B_WRITE_ONLY|B_FAIL_IF_EXISTS);
Declared in: be/storage/StorageDefs.h
| Constant | Meaning |
|---|---|
B_FILE_NODE | Files only. |
B_SYMLINK_NODE | Symbolic links only. |
B_DIRECTORY_NODE | Directories only. |
B_ANY_NODE | Matches any node. |
These constants are used when making a request that can be qualified based on the "flavor" of a node—in other words, whenever you wish to perform an operation on only files, directories, or symbolic links. This is used when opening a file panel, for instance, so that you can specify what types of items you want the user to be able to select.
Declared in: be/storage/AppFileInfo.h
| Constant | Meaning |
|---|---|
B_APP_VERSION_KIND | Records information about a specific application. |
B_SYSTEM_VERSION_KIND | Records information about a "suite," or other grouping of applications, that the application belongs to. |
These constants are used when setting or retrieving the version
information attached to an application. There are two version information
records for each application, and these two constants select which one
you wish to reference. Although there is no prescribed use for these
structures or their constants, it is suggested that B_APP_VERSION_KIND be
used for application-specific version information, and
B_SYSTEM_VERSION_KIND be used for information about the suite of
applications to which the application belongs.
Declared in: be/storage/FindDirectory.h
| Constant | Meaning |
|---|---|
B_DESKTOP_DIRECTORY | Desktop directory. |
B_TRASH_DIRECTORY | Trash directory. |
B_APPS_DIRECTORY | Applications directory. |
B_PREFERENCES_DIRECTORY | Preferences directory. |
B_BEOS_DIRECTORY | BeOS directory. |
B_BEOS_SYSTEM_DIRECTORY | System directory. |
B_BEOS_ADDONS_DIRECTORY | BeOS add-ons directory. |
B_BEOS_BOOT_DIRECTORY | Boot volume's root directory. |
B_BEOS_FONTS_DIRECTORY | BeOS fonts directory. |
B_BEOS_LIB_DIRECTORY | BeOS libraries directory. |
B_BEOS_SERVERS_DIRECTORY | BeOS servers directory. |
B_BEOS_APPS_DIRECTORY | BeOS applications directory. |
B_BEOS_BIN_DIRECTORY | /bin directory. |
B_BEOS_ETC_DIRECTORY | /etc directory. |
B_BEOS_DOCUMENTATION_DIRECTORY | BeOS documentation directory. |
B_BEOS_PREFERENCES_DIRECTORY | BeOS preferences directory. |
B_COMMON_DIRECTORY | The common directory, shared by all users. |
B_COMMON_SYSTEM_DIRECTORY | The shared system directory. |
B_COMMON_ADDONS_DIRECTORY | The shared addons directory. |
B_COMMON_BOOT_DIRECTORY | The shared boot directory. |
B_COMMON_FONTS_DIRECTORY | The shared fonts directory. |
B_COMMON_LIB_DIRECTORY | The shared libraries directory. |
B_COMMON_SERVERS_DIRECTORY | The shared servers directory. |
B_COMMON_BIN_DIRECTORY | The shared /bin directory. |
B_COMMON_ETC_DIRECTORY | The shared /etc directory. |
B_COMMON_DOCUMENTATION_DIRECTORY | The shared documentation directory. |
B_COMMON_SETTINGS_DIRECTORY | The shared settings directory. |
B_COMMON_DEVELOP_DIRECTORY | The shared develop directory. |
B_COMMON_LOG_DIRECTORY | The shared log directory. |
B_COMMON_SPOOL_DIRECTORY | The shared spool directory. |
B_COMMON_TEMP_DIRECTORY | The shared temporary items directory. |
B_COMMON_VAR_DIRECTORY | The shared /var directory. |
B_USER_DIRECTORY | The user's home directory. |
B_USER_CONFIG_DIRECTORY | The user's config directory. |
B_USER_ADDONS_DIRECTORY | The user's add-ons directory. |
B_USER_BOOT_DIRECTORY | The user's /boot directory. |
B_USER_FONTS_DIRECTORY | The user's fonts directory. |
B_USER_LIB_DIRECTORY | The user's libraries directory. |
B_USER_SETTINGS_DIRECTORY | The user's settings directory. |
B_USER_DESKBAR_DIRECTORY | The user's Deskbar directory. |
These constants are used when calling the
find_directory() function to
determine the pathname of a particular directory of interest.
B_DESKTOP_DIRECTORY and B_TRASH_DIRECTORY are per-volume directories; if
you don't specify the volume you wish to locate these directories on,
find_directory()
will assume you mean the boot disk.
B_APPS_DIRECTORY and B_PREFERENCES_DIRECTORY are global directories, and
always refer to the standard apps and preferences directories.
The B_BEOS_* constants refer to BeOS-owned directories, the B_COMMON_*
constants refer to directories that are common to all users of the
system, and the B_USER_* constants refer to the current user's
directories (currently these are all in a subtree rooted at
/boot/home,
but when multiuser support is implemented in a future version of BeOS,
these won't necessarily all be the same anymore).
In general, global application and system settings should be kept in
B_COMMON_*; while settings that each user should be able to configure
individually should be kept in B_USER_*.
By using these constants properly, your code will be compatible with future generations of the BeOS.
Declared in: be/storage/Mime.h
| Constant | Meaning |
|---|---|
B_LARGE_ICON | Large (32x32) icon. |
B_MINI_ICON | Small (16x16) icon. |
These constants are used when selecting icons from a meta MIME file; they let you fetch the large and small variations of a file's icon.
Declared in: be/storage/NodeMonitor.h
| Constant | Meaning |
|---|---|
B_STOP_WATCHING | Stop watching the node. |
B_WATCH_NAME | Watch for changes to the name of the node. |
B_WATCH_STAT | Watch for stat changes. |
B_WATCH_ATTR | Watch for attribute changes. |
B_WATCH_DIRECTORY | Watch for changes to the directory's contents. |
B_WATCH_ALL | Watch everything (except mounting). |
B_WATCH_MOUNT | Watch for disk mounts and unmounts. |
These constants are used to control what type of monitoring to perform on
a node. B_WATCH_ALL is a convenience constant that allows you to monitor
changes to the name, stat information, attributes, and directory of a
node. B_WATCH_MOUNT, which is not included in B_WATCH_ALL, monitors
volumes being mounted and unmounted.
B_WATCH_DIRECTORY applies only to directory nodes.
Declared in: be/storage/Query.h
| Constant | Operation |
|---|---|
B_EQ | = |
B_NE | != |
B_GT | > |
B_LT | < |
B_GE | >= |
B_LE | <= |
B_CONTAINS | string contains value ("*value*") |
B_BEGINS_WITH | string begins with value ("value*") |
B_ENDS_WITH | string ends with value ("*value") |
B_AND | && |
B_OR | || |
B_NOT | ! |
These constants define the operations that can be used to specify a query. They are used in conjunction with the push functions for constructing a query.