Murl::IFile Interface Referenceabstract

The file interface provides access to a single file. More...

#include "murl_i_file.h"

Inheritance diagram for Murl::IFile:

Public Member Functions

virtual UInt64 GetPosition ()=0
 Get the position of the file pointer. More...
 
virtual void SetPosition (UInt64 position)=0
 Set the position of the file pointer. More...
 
virtual UInt64 GetSize ()=0
 Get the size of the file. More...
 
virtual UInt64 Read (void *data, UInt64 byteSize)=0
 Read from the file at the current file pointer position. More...
 
virtual UInt64 Write (const void *data, UInt64 byteSize)=0
 Write to the file at the current file pointer position. More...
 
virtual UInt64 Read (Data &data)=0
 Read from the file at the current file pointer position. More...
 
virtual UInt64 Write (const ConstData &data)=0
 Write to the file at the current file pointer position. More...
 

Detailed Description

The file interface provides access to a single file.

The IFile object can be created by the IFileInterface object.

Member Function Documentation

◆ GetPosition()

virtual UInt64 Murl::IFile::GetPosition ( )
pure virtual

Get the position of the file pointer.

Read() / Write() operations start at the file pointer position, the default position is zero.

Returns
The position of the file pointer in bytes.

Implemented in Murl::Util::File.

◆ SetPosition()

virtual void Murl::IFile::SetPosition ( UInt64  position)
pure virtual

Set the position of the file pointer.

Read() / Write() operations start at the file pointer position, the default position is zero.

Parameters
positionThe position of the file pointer in bytes.

Implemented in Murl::Util::File.

◆ GetSize()

virtual UInt64 Murl::IFile::GetSize ( )
pure virtual

Get the size of the file.

Returns
The size of the file in bytes.

Implemented in Murl::Util::File.

◆ Read() [1/2]

virtual UInt64 Murl::IFile::Read ( void *  data,
UInt64  byteSize 
)
pure virtual

Read from the file at the current file pointer position.

Parameters
dataThe memory pointer to read the file into.
byteSizeThe number of bytes to read.
Returns
The number of bytes read into the memory.

Implemented in Murl::Util::File.

◆ Write() [1/2]

virtual UInt64 Murl::IFile::Write ( const void *  data,
UInt64  byteSize 
)
pure virtual

Write to the file at the current file pointer position.

Parameters
dataThe memory pointer to write into the file.
byteSizeThe number of bytes to write.
Returns
The number of bytes written into the file.

Implemented in Murl::Util::File.

◆ Read() [2/2]

virtual UInt64 Murl::IFile::Read ( Data data)
pure virtual

Read from the file at the current file pointer position.

The size of the data object's data is the number of bytes to read, if the data object is empty the data is resized to GetSize().

Parameters
dataThe data object to read the file into.
Returns
The number of bytes read into the data object.

Implemented in Murl::Util::File.

◆ Write() [2/2]

virtual UInt64 Murl::IFile::Write ( const ConstData data)
pure virtual

Write to the file at the current file pointer position.

Parameters
dataThe data object to write into the file.
Returns
The number of bytes written into the file.

Implemented in Murl::Util::File.


The documentation for this interface was generated from the following file:
  • murl_i_file.h


Copyright © 2011-2024 Spraylight GmbH.