|
Stxxl
1.3.1
|
Base for UNIX file system implementations. More...
#include <ufs_file_base.h>


Public Member Functions | |
| offset_type | size () |
| Returns size of the file. | |
| void | set_size (offset_type newsize) |
| Changes the size of the file. | |
| void | lock () |
| Locks file for reading and writing (acquires a lock in the file system) | |
| const char * | io_type () const |
| Identifies the type of I/O implementation. | |
| void | remove () |
Public Member Functions inherited from file | |
| 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. | |
| 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. | |
| 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. | |
| virtual int | get_allocator_id () const =0 |
| Returns the file's allocator. | |
| 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. | |
| virtual void | export_files (offset_type offset, offset_type length, std::string prefix) |
Protected Member Functions | |
| ufs_file_base (const std::string &filename, int mode) | |
| offset_type | _size () |
| void | close () |
Protected Member Functions inherited from file | |
| file () | |
| Initializes file object. | |
Protected Attributes | |
| mutex | fd_mutex |
| int | file_des |
| int | mode_ |
| const std::string | filename |
Additional Inherited Members | |
Public Types inherited from file | |
| 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 Public Attributes inherited from file | |
| static const int | DEFAULT_QUEUE = -1 |
| static const int | NO_QUEUE = -2 |
| static const int | NO_ALLOCATOR = -1 |
Base for UNIX file system implementations.
|
virtual |
Identifies the type of I/O implementation.
Reimplemented from file.
Reimplemented in sim_disk_file, mmap_file, and syscall_file.
|
virtual |
Locks file for reading and writing (acquires a lock in the file system)
Implements file.
References file::RDONLY.
|
virtual |
Changes the size of the file.
| newsize | new file size |
Implements file.
Reimplemented in sim_disk_file.
|
virtual |
1.8.1.1