ark::normal_file class

wraps fildes that represents an normal file as an io object

Base classes

class seekable_fd
An io object, denotes a lseek()-able fd as defined in kernel.

Public static functions

static auto open(string path, int flags) -> result<normal_file> noexcept
create an normal_file like calling open(2)
static auto open(string path, int flags, mode_t mode) -> result<normal_file> noexcept
create an normal_file like calling open(2)
static auto open(async_context& ctx, string path, int flags) -> result<normal_file> noexcept
create an normal_file like calling open(2), and bind to given ark::async_context
static auto open(async_context& ctx, string path, int flags, mode_t mode) -> result<normal_file> noexcept
create an normal_file like calling open(2), and bind to given ark::async_context
static auto mkostemp(const string& templ, int flags) -> result<normal_file> noexcept
create an normal_file like calling mkostemp(2)
static auto mkostemp(async_context& ctx, const string& templ, int flags) -> result<normal_file> noexcept
create an normal_file like calling mkostemp(2), and bind to given ark::async_context

Constructors, destructors, conversion operators

normal_file(int fd_int) protected
constructs from int fildes

Function documentation

static result<normal_file> ark::normal_file::open(string path, int flags) noexcept

create an normal_file like calling open(2)

static result<normal_file> ark::normal_file::open(string path, int flags, mode_t mode) noexcept

create an normal_file like calling open(2)

static result<normal_file> ark::normal_file::open(async_context& ctx, string path, int flags) noexcept

create an normal_file like calling open(2), and bind to given ark::async_context

static result<normal_file> ark::normal_file::open(async_context& ctx, string path, int flags, mode_t mode) noexcept

create an normal_file like calling open(2), and bind to given ark::async_context

ark::normal_file::normal_file(int fd_int) protected

constructs from int fildes

Parameters
fd_int in must be an fildes that represents an normal file