Base for UNIX file system implementations.
More...
#include <ufs_file_base.h>
|
offset_type | size () |
| Returns size of the file. More...
|
|
void | set_size (offset_type newsize) |
| Changes the size of the file. More...
|
|
void | lock () |
| Locks file for reading and writing (acquires a lock in the file system) More...
|
|
const char * | io_type () const |
| Identifies the type of I/O implementation. More...
|
|
void | remove () |
|
virtual request_ptr | aread (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)=0 |
| Schedules an asynchronous read request to the file. More...
|
|
virtual request_ptr | awrite (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)=0 |
| Schedules an asynchronous write request to the file. More...
|
|
virtual void | serve (const request *req)=0 throw (io_error) |
|
void | add_request_ref () |
|
void | delete_request_ref () |
|
int | get_request_nref () |
|
virtual int | get_queue_id () const =0 |
| Returns the identifier of the file's queue. More...
|
|
virtual int | get_allocator_id () const =0 |
| Returns the file's allocator. More...
|
|
virtual int | get_physical_device_id () const |
|
virtual void | discard (offset_type offset, offset_type size) |
| Discard a region of the file (mark it unused) some specialized file types may need to know freed regions. More...
|
|
virtual void | export_files (offset_type offset, offset_type length, std::string prefix) |
|
|
| ufs_file_base (const std::string &filename, int mode) |
|
offset_type | _size () |
|
void | close () |
|
| file () |
| Initializes file object. More...
|
|
|
mutex | fd_mutex |
|
int | file_des |
|
int | mode_ |
|
const std::string | filename |
|
|
enum | open_mode {
RDONLY = 1,
WRONLY = 2,
RDWR = 4,
CREAT = 8,
DIRECT = 16,
TRUNC = 32,
SYNC = 64,
NO_LOCK = 128
} |
| Definition of acceptable file open modes. More...
|
|
typedef request::offset_type | offset_type |
|
typedef request::size_type | size_type |
|
static const int | DEFAULT_QUEUE = -1 |
|
static const int | NO_QUEUE = -2 |
|
static const int | NO_ALLOCATOR = -1 |
|
Base for UNIX file system implementations.
__STXXL_BEGIN_NAMESPACE const char * ufs_file_base::io_type |
( |
| ) |
const |
|
virtual |
Identifies the type of I/O implementation.
- Returns
- pointer to null terminated string of characters, containing the name of I/O implementation
Reimplemented from file.
void ufs_file_base::lock |
( |
| ) |
|
|
virtual |
Locks file for reading and writing (acquires a lock in the file system)
Implements file.
References file::RDONLY.
void ufs_file_base::set_size |
( |
offset_type |
newsize | ) |
|
|
virtual |
Changes the size of the file.
- Parameters
-
Implements file.
file::offset_type ufs_file_base::size |
( |
| ) |
|
|
virtual |
Returns size of the file.
- Returns
- file size in bytes
Implements file.
The documentation for this class was generated from the following files: