#import <CDBFile.h>
Inherits CDBFile.
This is a thin Objective-C wrapper around Michael Tokarev's tinycdb library, which is itself a rewrite of Dan Bernstein's cdb.
Public Member Functions | |
(id) | - initWithFile: |
Creates a CDBReader on an existing CDB file. | |
(CDBData) | - valuePointerForKey: |
Returns a pointer to the value associated with the key. | |
(CDBEnumerator *) | - keyEnumerator |
Returns an enumerator that will return all of the keys, in unspecified order. |
- (id) initWithFile: | (NSString*) | path |
Creates a CDBReader on an existing CDB file.
The file must exist, but it is not opened or read from until the -open method is called.
Returns a pointer to the value associated with the key.
(If there is none, the return value will have bytes=NULL and length=0.) You can use the CDBTo... utility functions to convert the value to NSData or NSString. This points directly into the memory-mapped file, without any copying, so it's very efficient. But the memory pointed to only remains valid until the CDBReader is closed!
- (CDBEnumerator *) keyEnumerator |
Returns an enumerator that will return all of the keys, in unspecified order.