openMSX
Public Member Functions | List of all members
openmsx::FileBase Class Referenceabstract

#include <FileBase.hh>

Inheritance diagram for openmsx::FileBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~FileBase ()=default
 
virtual void read (std::span< uint8_t > buffer)=0
 
virtual void write (std::span< const uint8_t > buffer)=0
 
virtual std::span< const uint8_t > mmap ()
 
virtual void munmap ()
 
virtual size_t getSize ()=0
 
virtual void seek (size_t pos)=0
 
virtual size_t getPos ()=0
 
virtual void truncate (size_t size)
 
virtual void flush ()=0
 
virtual const std::string & getURL () const =0
 
virtual std::string getLocalReference ()
 
virtual std::string_view getOriginalName ()
 
virtual bool isReadOnly () const =0
 
virtual time_t getModificationDate ()=0
 

Detailed Description

Definition at line 13 of file FileBase.hh.

Constructor & Destructor Documentation

◆ ~FileBase()

virtual openmsx::FileBase::~FileBase ( )
virtualdefault

Member Function Documentation

◆ flush()

virtual void openmsx::FileBase::flush ( )
pure virtual

◆ getLocalReference()

std::string openmsx::FileBase::getLocalReference ( )
virtual

Reimplemented in openmsx::LocalFile.

Definition at line 48 of file FileBase.cc.

◆ getModificationDate()

virtual time_t openmsx::FileBase::getModificationDate ( )
pure virtual

◆ getOriginalName()

std::string_view openmsx::FileBase::getOriginalName ( )
virtual

Reimplemented in openmsx::CompressedFileAdapter.

Definition at line 55 of file FileBase.cc.

References openmsx::FileOperations::getFilename(), and getURL().

◆ getPos()

virtual size_t openmsx::FileBase::getPos ( )
pure virtual

◆ getSize()

virtual size_t openmsx::FileBase::getSize ( )
pure virtual

◆ getURL()

virtual const std::string & openmsx::FileBase::getURL ( ) const
pure virtual

◆ isReadOnly()

virtual bool openmsx::FileBase::isReadOnly ( ) const
pure virtual

◆ mmap()

std::span< const uint8_t > openmsx::FileBase::mmap ( )
virtual

◆ munmap()

void openmsx::FileBase::munmap ( )
virtual

Reimplemented in openmsx::CompressedFileAdapter.

Definition at line 25 of file FileBase.cc.

References openmsx::MemBuffer< T, ALIGNMENT >::clear().

Referenced by openmsx::LocalFile::~LocalFile().

◆ read()

virtual void openmsx::FileBase::read ( std::span< uint8_t >  buffer)
pure virtual

◆ seek()

virtual void openmsx::FileBase::seek ( size_t  pos)
pure virtual

◆ truncate()

void openmsx::FileBase::truncate ( size_t  size)
virtual

Reimplemented in openmsx::CompressedFileAdapter.

Definition at line 30 of file FileBase.cc.

References getSize(), seek(), subspan(), and write().

◆ write()

virtual void openmsx::FileBase::write ( std::span< const uint8_t >  buffer)
pure virtual

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