The ChVolume class is an easy way of manipulating the indexes on a volume.
This indexing functionality was originally part of the BVolume class during the original Advanced Access: Preview Release of BeOS. It disappeared in Preview Release, leaving only the C indexing API.
The ChVolume object may keep a file descriptor open for its lifetime; this should only be a problem if your application is keeping hundreds of files open at a time. For more information about the limited number of file descriptors, see the BeBook's Storage Kit documentation.
#include "Ch/ChVolume.h" ChVolume();
Create a new, uninitialized ChVolume object. You'll have to use BVolume's SetTo() method to make it useful.
#include "Ch/ChVolume.h" ChVolume( dev_t dev );
Create a new ChVolume object referring to the device dev.
#include "Ch/ChVolume.h" ChVolume( const BVolume &vol );
Create a new ChVolume object from the existing BVolume vol.
#include "Ch/ChVolume.h" ChVolume( const ChVolume &vol );
Create a new ChVolume object from the existing ChVolume vol.
status_t AddIndex( const char *index, int type, uint flags );
Add a new index named index with the specific type and flags.
For a description of type and flags arguments, see fs_create_index() in the BeBook.
AddIndex() will return B_NO_ERROR for success, or:
status_t RemoveIndex( const char *index );
Remove the index named index.
RemoveIndex() returns B_NO_ERROR for success, or:
status_t GetIndexInfo( const char *index, struct index_info *info );
Get the index information for the index named index, and store it in the buffer info.
For a description of the struct index_info structure, see fs_stat_index() in the BeBook, or the <kernel/fs_index.h> header.
GetIndexInfo() returns B_NO_ERROR for success, or:
status_t GetNextIndexName( char *buf );
Get the next index name and store it in the buffer buf. If there is no "next" index name, GetNextIndexName will return B_NO_ERROR and buf will be a 0-length string.
You must allocate B_FILE_NAME_LENGTH bytes for buf; this is your buffer, and you must also take responsibility for deallocating it when necessary.
GetNextIndexName() returns B_NO_ERROR for success, or:
status_t RewindIndexList( void );
Rewind the list of index names to the first index name.
RewindIndexList() returns B_NO_ERROR for success, or:
ChVolume &operator=( const BVolume &vol );
Assign an existing BVolume to this ChVolume.
ChVolume &operator=( const ChVolume &vol );
Assign an existing ChVolume to this ChVolume.
Please see the libCh Overview for licensing information.
Last modified: $Date: 1998/04/11 19:41:01 $