MPD: FileReader Class Reference

MPD 0.20.18

Public Member Functions | Protected Member Functions
FileReader Class Referencefinal

`#include <FileReader.hxx>`

Inheritance diagram for FileReader:
[legend]
Collaboration diagram for FileReader:
[legend]

## Public Member Functions
| FileReader (Path _path)
| FileReader (FileReader &&other)
| ~FileReader ()
FileDescriptor | GetFD () const
void | Close ()
FileInfo | GetFileInfo () const
gcc_pure uint64_t | GetSize () const noexcept
gcc_pure uint64_t | GetPosition () const noexcept
void | Rewind ()
void | Seek (off_t offset)
void | Skip (off_t offset)
size_t | Read (void *data, size_t size) override
| Read data from the stream. More...
Public Member Functions inherited from Reader
| Reader ()=default
| Reader (const Reader &)=delete

## Protected Member Functions
bool | IsDefined () const

## Detailed Description

Definition at line 39 of file FileReader.hxx.

## Constructor & Destructor Documentation

## ◆ FileReader() [1/2]

FileReader::FileReader | ( | Path | _path | ) |
| explicit

## ◆ FileReader() [2/2]

FileReader::FileReader | ( | FileReader && | other | ) |
| inline

Definition at line 58 of file FileReader.hxx.

## ◆ ~FileReader()

FileReader::~FileReader | ( |  | ) |
| inline

Definition at line 65 of file FileReader.hxx.

## Member Function Documentation

## ◆ Close()

void FileReader::Close | ( |  | ) |

## ◆ GetFD()

FileDescriptor FileReader::GetFD | ( |  | ) | const
| inline

Definition at line 82 of file FileReader.hxx.

## ◆ GetFileInfo()

FileInfo FileReader::GetFileInfo | ( |  | ) | const

## ◆ GetPosition()

gcc_pure uint64_t FileReader::GetPosition | ( |  | ) | const
| inlinenoexcept

Definition at line 104 of file FileReader.hxx.

## ◆ GetSize()

gcc_pure uint64_t FileReader::GetSize | ( |  | ) | const
| inlinenoexcept

Definition at line 92 of file FileReader.hxx.

## ◆ IsDefined()

bool FileReader::IsDefined | ( |  | ) | const
| inlineprotected

Definition at line 72 of file FileReader.hxx.

## ◆ Read()

size_t FileReader::Read | ( | void * | data,
|  | size_t | size
| ) |  |
| overridevirtual

Read data from the stream.

Returns
  the number of bytes read into the given buffer or 0 on end-of-stream

Implements Reader.

## ◆ Rewind()

void FileReader::Rewind | ( |  | ) |
| inline

Definition at line 117 of file FileReader.hxx.

## ◆ Seek()

void FileReader::Seek | ( | off_t | offset | ) |

## ◆ Skip()

void FileReader::Skip | ( | off_t | offset | ) |

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

- fs/io/FileReader.hxx