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 (string_view filename, File::OpenMode mode)
 
 LocalFile (string_view filename, const char *mode)
 
 ~LocalFile ()
 
void read (void *buffer, size_t num) override
 
void write (const void *buffer, size_t num) override
 
const bytemmap (size_t &size) 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
 
const std::string getURL () const override
 
const 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 const std::string getOriginalName ()
 

Detailed Description

Definition at line 18 of file LocalFile.hh.

Constructor & Destructor Documentation

◆ LocalFile() [1/2]

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

◆ LocalFile() [2/2]

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

◆ ~LocalFile()

openmsx::LocalFile::~LocalFile ( )

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 261 of file LocalFile.cc.

◆ getLocalReference()

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

Reimplemented from openmsx::FileBase.

Definition at line 271 of file LocalFile.cc.

◆ getModificationDate()

time_t openmsx::LocalFile::getModificationDate ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 281 of file LocalFile.cc.

◆ getPos()

size_t openmsx::LocalFile::getPos ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 246 of file LocalFile.cc.

◆ getSize()

size_t openmsx::LocalFile::getSize ( )
overridevirtual

Implements openmsx::FileBase.

Definition at line 211 of file LocalFile.cc.

References getURL().

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

◆ getURL()

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

Implements openmsx::FileBase.

Definition at line 266 of file LocalFile.cc.

Referenced by getSize().

◆ isReadOnly()

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

Implements openmsx::FileBase.

Definition at line 276 of file LocalFile.cc.

◆ mmap()

const byte * openmsx::LocalFile::mmap ( size_t &  size)
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 183 of file LocalFile.cc.

References getSize().

Referenced by write().

◆ munmap()

void openmsx::LocalFile::munmap ( )
overridevirtual

Reimplemented from openmsx::FileBase.

Definition at line 202 of file LocalFile.cc.

References getSize().

Referenced by write(), and ~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 234 of file LocalFile.cc.

◆ truncate()

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

Reimplemented from openmsx::FileBase.

Definition at line 252 of file LocalFile.cc.

◆ write()

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

Implements openmsx::FileBase.

Definition at line 118 of file LocalFile.cc.

References getSize(), mmap(), munmap(), and size().


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