BFile Class Reference

#include <storage/File.h>

Inheritance diagram for BFile:

BnStorage BnInterface< IStorage > IStorage BBinder IInterface IBinder SAtom SAtom List of all members.

Public Member Functions

 BFile (const BCatalog *dir, const char *path, uint32_t open_mode)
 BFile (const char *path, uint32_t open_mode)
 BFile (const BEntry *entry, uint32_t open_mode)
 BFile (const entry_ref *ref, uint32_t open_mode)
 BFile (const BFile &file)
 BFile (const char *path, uint32_t open_mode)
 BFile ()
bool IsReadable () const
bool IsWritable () const
virtual ssize_t ReadAtV (off_t position, const struct iovec *vector, ssize_t count)
 Read the bytes described by iovec from location position in the storage.
virtual status_t SetSize (off_t size)
 Set the total number of bytes in the store.
status_t SetTo (const BCatalog *dir, const char *path, uint32_t open_mode)
status_t SetTo (const BEntry *entry, uint32_t open_mode)
status_t SetTo (const entry_ref *ref, uint32_t open_mode)
status_t SetTo (const char *path, uint32_t open_mode)
virtual off_t Size () const
 Return the total number of bytes in the store.
virtual status_t Sync ()
 Make sure all data in the storage is written to its physical device.
virtual ssize_t WriteAtV (off_t position, const struct iovec *vector, ssize_t count)
 Write the bytes described by iovec at location position in the storage.

Protected Member Functions

virtual ~BFile ()

Constructor & Destructor Documentation

BFile  ) 
 

BFile const char *  path,
uint32_t  open_mode
 

BFile const BFile file  ) 
 

BFile const entry_ref *  ref,
uint32_t  open_mode
 

BFile const BEntry *  entry,
uint32_t  open_mode
 

BFile const char *  path,
uint32_t  open_mode
 

BFile const BCatalog dir,
const char *  path,
uint32_t  open_mode
 

~BFile  )  [protected, virtual]
 


Member Function Documentation

bool IsReadable  )  const
 

bool IsWritable  )  const
 

ssize_t ReadAtV off_t  position,
const struct iovec *  vector,
ssize_t  count
[virtual]
 

Read the bytes described by iovec from location position in the storage.

Returns the number of bytes actually read, or a negative error code.

Implements IStorage.

status_t SetSize off_t  size  )  [virtual]
 

Set the total number of bytes in the store.

Implements IStorage.

status_t SetTo const BCatalog dir,
const char *  path,
uint32_t  open_mode
 

status_t SetTo const BEntry *  entry,
uint32_t  open_mode
 

status_t SetTo const entry_ref *  ref,
uint32_t  open_mode
 

status_t SetTo const char *  path,
uint32_t  open_mode
 

off_t Size  )  const [virtual]
 

Return the total number of bytes in the store.

Implements IStorage.

status_t Sync  )  [virtual]
 

Make sure all data in the storage is written to its physical device.

Returns B_OK if the data is safely stored away, else an error code.

Implements IStorage.

ssize_t WriteAtV off_t  position,
const struct iovec *  vector,
ssize_t  count
[virtual]
 

Write the bytes described by iovec at location position in the storage.

Returns the number of bytes actually written, or a negative error code.

Implements IStorage.


The documentation for this class was generated from the following files: