File

struct File : public roq::io::FileDescriptor

Public Functions

File(std::string const &path, Mask<Flags>, Mask<Mode> = {})
inline File(std::string_view const &path, Mask<Flags> flags, Mask<Mode> mode = {})
void truncate(size_t length)
size_t size() const
bool empty() const
size_t tell() const
void seek(size_t offset, int whence) const
size_t read(void *buf, size_t count)
inline size_t read(std::span<std::byte> const &buffer)
size_t write(void const *buf, size_t count)
inline size_t write(std::span<std::byte const> const &buffer)
void ensure_size(size_t length)
void sync()
void chmod(Mask<Mode>)
inline explicit FileDescriptor(value_type fd)
inline FileDescriptor(FileDescriptor &&rhs)
FileDescriptor(FileDescriptor const&) = delete

Public Static Functions

static void utimes(std::string const &path)
static inline void utimes(std::string_view const &path)
static void remove(std::string const &path)
static inline void remove(std::string_view const &path)
static void rename(std::string const &old_path, std::string const &new_path)
static File create_random(std::string_view const &template_, std::string &path)
static inline File create_random(std::string_view const &template_)