This class provides a friendly representation of an attribute
This class provides a friendly representation of an attribute. It models this by using the BPositionIO class from the Support Kit, which lets you seek, read, and write at arbitrary points within the attribute's data stream.You can use Attribute in two ways: first, as a stand-alone utility class that you instantiate, use to manipulate an attribute, then throw away. Second, as parent class for an object in your application that corresponds directly to an attribute on a file. You can use the Attribute methods to update your attribute when your object's state changes, and call Flush as needed.
This class is not well-suited for especially large attributes, since the entire data stream is pulled into memory.
To remove an attribute, see BNode::RemoveAttr.
~Attribute()
static bool Exists(const BNode *node, const char *name)
virtual ssize_t Read(void *buffer, size_t size)
virtual ssize_t Write(const void *buffer, size_t size)
virtual ssize_t ReadAt(off_t pos, void *buffer, size_t size)
virtual ssize_t WriteAt(off_t pos, const void *buffer, size_t size)
virtual off_t Seek(off_t position, uint32 seek_mode)
virtual off_t Position() const
off_t Size()
status_t Flush()
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de