Unravel Engine C++ Reference
Loading...
Searching...
No Matches
fs::file_ostream Class Reference

stdio-backed output stream. Accepts std::ios open flags (e.g. std::ios::binary | std::ios::app) More...

#include <file_ostream.h>

Inheritance diagram for fs::file_ostream:

Classes

struct  impl
 

Public Member Functions

 file_ostream ()
 
 file_ostream (const path &file_path, std::ios_base::openmode mode=default_file_write_mode)
 
 file_ostream (const std::string &absolute_path, std::ios_base::openmode mode=default_file_write_mode)
 
 file_ostream (FILE *file, file_stream_ownership ownership=file_stream_ownership::take_ownership)
 
 file_ostream (const file_ostream &)=delete
 
auto operator= (const file_ostream &) -> file_ostream &=delete
 
 file_ostream (file_ostream &&other) noexcept
 
auto operator= (file_ostream &&other) noexcept -> file_ostream &
 
 ~file_ostream () override
 
void open (const path &file_path, std::ios_base::openmode mode=default_file_write_mode)
 
void open (const std::string &absolute_path, std::ios_base::openmode mode=default_file_write_mode)
 
auto is_open () const -> bool
 
auto native_handle () const -> FILE *
 
auto tell () const -> long long
 
auto file_size () const -> long long
 
auto seek (long long offset, int whence=SEEK_SET) -> bool
 
auto flush_file () -> bool
 
void close ()
 

Detailed Description

stdio-backed output stream. Accepts std::ios open flags (e.g. std::ios::binary | std::ios::app)

when opening a path; defaults to binary write ("wb").

Definition at line 29 of file file_ostream.h.

Constructor & Destructor Documentation

◆ file_ostream() [1/6]

fs::file_ostream::file_ostream ( )

Definition at line 308 of file file_ostream.cpp.

◆ file_ostream() [2/6]

fs::file_ostream::file_ostream ( const path & file_path,
std::ios_base::openmode mode = default_file_write_mode )
explicit

Definition at line 315 of file file_ostream.cpp.

◆ file_ostream() [3/6]

fs::file_ostream::file_ostream ( const std::string & absolute_path,
std::ios_base::openmode mode = default_file_write_mode )
explicit

Definition at line 320 of file file_ostream.cpp.

◆ file_ostream() [4/6]

fs::file_ostream::file_ostream ( FILE * file,
file_stream_ownership ownership = file_stream_ownership::take_ownership )
explicit

Definition at line 356 of file file_ostream.cpp.

◆ file_ostream() [5/6]

fs::file_ostream::file_ostream ( const file_ostream & )
delete

◆ file_ostream() [6/6]

fs::file_ostream::file_ostream ( file_ostream && other)
noexcept

Definition at line 364 of file file_ostream.cpp.

◆ ~file_ostream()

fs::file_ostream::~file_ostream ( )
overridedefault

Member Function Documentation

◆ close()

void fs::file_ostream::close ( )

Definition at line 416 of file file_ostream.cpp.

◆ file_size()

auto fs::file_ostream::file_size ( ) const -> long long

Definition at line 400 of file file_ostream.cpp.

◆ flush_file()

auto fs::file_ostream::flush_file ( ) -> bool

Definition at line 410 of file file_ostream.cpp.

◆ is_open()

auto fs::file_ostream::is_open ( ) const -> bool

Definition at line 385 of file file_ostream.cpp.

◆ native_handle()

auto fs::file_ostream::native_handle ( ) const -> FILE*

Definition at line 390 of file file_ostream.cpp.

◆ open() [1/2]

void fs::file_ostream::open ( const path & file_path,
std::ios_base::openmode mode = default_file_write_mode )

Definition at line 336 of file file_ostream.cpp.

◆ open() [2/2]

void fs::file_ostream::open ( const std::string & absolute_path,
std::ios_base::openmode mode = default_file_write_mode )

Definition at line 341 of file file_ostream.cpp.

◆ operator=() [1/2]

auto fs::file_ostream::operator= ( const file_ostream & ) -> file_ostream &=delete
delete

◆ operator=() [2/2]

auto fs::file_ostream::operator= ( file_ostream && other) -> file_ostream&
noexcept

Definition at line 372 of file file_ostream.cpp.

◆ seek()

auto fs::file_ostream::seek ( long long offset,
int whence = SEEK_SET ) -> bool

Definition at line 405 of file file_ostream.cpp.

◆ tell()

auto fs::file_ostream::tell ( ) const -> long long

Definition at line 395 of file file_ostream.cpp.


The documentation for this class was generated from the following files: