libopenraw
File Class Reference

#include <file.hpp>

Inheritance diagram for File:
OpenRaw::IO::Stream

Public Member Functions

 File (const char *filename)
 File (const File &f)=delete
Fileoperator= (const File &)=delete
virtual Error open () override
virtual int close () override
virtual int seek (off_t offset, int whence) override
virtual int read (void *buf, size_t count) override
virtual off_t filesize () override
Public Member Functions inherited from OpenRaw::IO::Stream
 Stream (const char *filename)
Error get_error ()
const std::string & get_path () const
uint8_t readByte () noexcept(false)

Additional Inherited Members

Public Types inherited from OpenRaw::IO::Stream
typedef std::shared_ptr< StreamPtr
typedef ::or_error Error
Protected Member Functions inherited from OpenRaw::IO::Stream
void set_error (Error error)

Detailed Description

file IO stream

Definition at line 36 of file file.hpp.

Constructor & Destructor Documentation

◆ File()

OpenRaw::IO::File::File ( const char * filename)

Contruct the file

Parameters
filenamethe full pathname for the file

Definition at line 33 of file file.cpp.

◆ ~File()

OpenRaw::IO::File::~File ( )
virtual

Definition at line 40 of file file.cpp.

Member Function Documentation

◆ close()

int OpenRaw::IO::File::close ( )
overridevirtual

close the file

Implements OpenRaw::IO::Stream.

Definition at line 56 of file file.cpp.

◆ filesize()

off_t OpenRaw::IO::File::filesize ( )
overridevirtual

Implements OpenRaw::IO::Stream.

Definition at line 73 of file file.cpp.

◆ open()

File::Error OpenRaw::IO::File::open ( )
overridevirtual

open the file

Implements OpenRaw::IO::Stream.

Definition at line 47 of file file.cpp.

◆ read()

int OpenRaw::IO::File::read ( void * buf,
size_t count )
overridevirtual

read in the file. Semantics are similar to POSIX

Implements OpenRaw::IO::Stream.

Definition at line 68 of file file.cpp.

◆ seek()

int OpenRaw::IO::File::seek ( off_t offset,
int whence )
overridevirtual

seek in the file. Semantics are similar to POSIX

Implements OpenRaw::IO::Stream.

Definition at line 63 of file file.cpp.


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