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

stdio-backed input stream. Accepts std::ios open flags (e.g. std::ios::binary) when opening a More...

#include <file_istream.h>

Inheritance diagram for fs::file_istream:

Classes

struct  impl
 

Public Member Functions

 file_istream ()
 
 file_istream (const path &file_path, std::ios_base::openmode mode=default_file_read_mode)
 
 file_istream (const std::string &absolute_path, std::ios_base::openmode mode=default_file_read_mode)
 
 file_istream (FILE *file, file_stream_ownership ownership=file_stream_ownership::take_ownership)
 
 file_istream (const file_istream &)=delete
 
auto operator= (const file_istream &) -> file_istream &=delete
 
 file_istream (file_istream &&other) noexcept
 
auto operator= (file_istream &&other) noexcept -> file_istream &
 
 ~file_istream () override
 
void open (const path &file_path, std::ios_base::openmode mode=default_file_read_mode)
 
void open (const std::string &absolute_path, std::ios_base::openmode mode=default_file_read_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
 
void close ()
 

Detailed Description

stdio-backed input stream. Accepts std::ios open flags (e.g. std::ios::binary) when opening a

path; defaults to binary read ("rb").

Definition at line 29 of file file_istream.h.

Constructor & Destructor Documentation

◆ file_istream() [1/6]

fs::file_istream::file_istream ( )

Definition at line 298 of file file_istream.cpp.

◆ file_istream() [2/6]

fs::file_istream::file_istream ( const path & file_path,
std::ios_base::openmode mode = default_file_read_mode )
explicit

Definition at line 305 of file file_istream.cpp.

◆ file_istream() [3/6]

fs::file_istream::file_istream ( const std::string & absolute_path,
std::ios_base::openmode mode = default_file_read_mode )
explicit

Definition at line 310 of file file_istream.cpp.

◆ file_istream() [4/6]

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

Definition at line 346 of file file_istream.cpp.

◆ file_istream() [5/6]

fs::file_istream::file_istream ( const file_istream & )
delete

◆ file_istream() [6/6]

fs::file_istream::file_istream ( file_istream && other)
noexcept

Definition at line 354 of file file_istream.cpp.

◆ ~file_istream()

fs::file_istream::~file_istream ( )
overridedefault

Member Function Documentation

◆ close()

void fs::file_istream::close ( )

Definition at line 400 of file file_istream.cpp.

◆ file_size()

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

Definition at line 390 of file file_istream.cpp.

◆ is_open()

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

Definition at line 375 of file file_istream.cpp.

◆ native_handle()

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

Definition at line 380 of file file_istream.cpp.

◆ open() [1/2]

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

Definition at line 326 of file file_istream.cpp.

◆ open() [2/2]

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

Definition at line 331 of file file_istream.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 362 of file file_istream.cpp.

◆ seek()

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

Definition at line 395 of file file_istream.cpp.

◆ tell()

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

Definition at line 385 of file file_istream.cpp.


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