File (C++-API)

This page describes the C++ implementation of File

struct a0::File : public a0::details::CppWrap<a0_file_t>

Public Functions

operator Buf() const

Implicit conversions.

size_t size() const

File size.

std::string path() const

File path.

int fd() const

File descriptor.

stat_t stat() const

File state.

Public Static Functions

void remove(string_view path)

Removes the specified file.

void remove_all(string_view path)

Removes the specified file or directory, including all subdirectories.

struct Options

Options for creating new files or directories.

These will not change existing files.

Public Static Attributes

Options DEFAULT

Default file creation options.

16MB and universal read+write.

struct CreateOptions

Public Members

off_t size

File size.

mode_t mode

File mode.

mode_t dir_mode

Mode for directories that will be created as part of file creation.

struct OpenOptions

Public Members

a0_arena_mode_t arena_mode