openMSX
Public Member Functions | List of all members
openmsx::LocalFile Class Referencefinal

#include <LocalFile.hh>

Inheritance diagram for openmsx::LocalFile:
Inheritance graph
[legend]
Collaboration diagram for openmsx::LocalFile:
Collaboration graph
[legend]

Public Member Functions

 LocalFile (std::string_view filename, File::OpenMode mode)
 
 LocalFile (std::string_view filename, const char *mode)
 
 ~LocalFile () override
 
void read (void *buffer, size_t num) override
 
void write (const void *buffer, size_t num) override
 
span< uint8_t > mmap () override
 
void munmap () override
 
size_t getSize () override
 
void seek (size_t pos) override
 
size_t getPos () override
 
void truncate (size_t size) override
 
void flush () override
 
std::string getURL () const override
 
std::string getLocalReference () override
 
bool isReadOnly () const override
 
time_t getModificationDate () override
 
void preCacheFile ()
 
- Public Member Functions inherited from openmsx::FileBase
virtual ~FileBase ()=default
 
virtual std::string getOriginalName ()
 

Detailed Description

Definition at line 18 of file LocalFile.hh.

Constructor & Destructor Documentation

◆ LocalFile() [1/2]

openmsx::LocalFile::LocalFile ( std::string_view  filename,
File::OpenMode  mode 
)

◆ LocalFile() [2/2]

openmsx::LocalFile::LocalFile ( std::string_view  filename,
const char *  mode 
)

◆ ~LocalFile()

openmsx::LocalFile::~LocalFile ( )
override

Definition at line 95 of file LocalFile.cc.

References munmap().

Member Function Documentation

◆ flush()

void openmsx::LocalFile::flush ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 266 of file LocalFile.cc.

◆ getLocalReference()

string openmsx::LocalFile::getLocalReference ( )
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 276 of file LocalFile.cc.

References openmsx::filename.

◆ getModificationDate()

time_t openmsx::LocalFile::getModificationDate ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 286 of file LocalFile.cc.

◆ getPos()

size_t openmsx::LocalFile::getPos ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 251 of file LocalFile.cc.

◆ getSize()

size_t openmsx::LocalFile::getSize ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 216 of file LocalFile.cc.

References getURL().

Referenced by LocalFile(), mmap(), and munmap().

◆ getURL()

string openmsx::LocalFile::getURL ( ) const
overridevirtual

Implements openmsx::FileBase.

Definition at line 271 of file LocalFile.cc.

References openmsx::filename.

Referenced by getSize().

◆ isReadOnly()

bool openmsx::LocalFile::isReadOnly ( ) const
overridevirtual

Implements openmsx::FileBase.

Definition at line 281 of file LocalFile.cc.

◆ mmap()

span< uint8_t > openmsx::LocalFile::mmap ( )
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 183 of file LocalFile.cc.

References getSize(), and utf8::unchecked::size().

◆ munmap()

void openmsx::LocalFile::munmap ( )
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 202 of file LocalFile.cc.

References getSize().

Referenced by ~LocalFile().

◆ preCacheFile()

void openmsx::LocalFile::preCacheFile ( )

Definition at line 100 of file LocalFile.cc.

References openmsx::FileOperations::getNativePath().

◆ read()

void openmsx::LocalFile::read ( void *  buffer,
size_t  num 
)
overridevirtual

Implements openmsx::FileBase.

Definition at line 106 of file LocalFile.cc.

◆ seek()

void openmsx::LocalFile::seek ( size_t  pos)
overridevirtual

Implements openmsx::FileBase.

Definition at line 239 of file LocalFile.cc.

◆ truncate()

void openmsx::LocalFile::truncate ( size_t  size)
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 257 of file LocalFile.cc.

References utf8::unchecked::size().

◆ write()

void openmsx::LocalFile::write ( const void *  buffer,
size_t  num 
)
overridevirtual

Implements openmsx::FileBase.

Definition at line 118 of file LocalFile.cc.


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