MPD: Storage Class Reference

MPD 0.20.18

Public Member Functions
Storage Class Referenceabstract

`#include <StorageInterface.hxx>`

Inheritance diagram for Storage:
[legend]

## Public Member Functions
| Storage ()=default
| Storage (const Storage &)=delete
virtual | ~Storage ()
virtual StorageFileInfo | GetInfo (const char *uri_utf8, bool follow)=0
| Throws #std::runtime_error on error. More...
virtual StorageDirectoryReader * | OpenDirectory (const char *uri_utf8)=0
| Throws #std::runtime_error on error. More...
virtual gcc_pure std::string | MapUTF8 (const char *uri_utf8) const noexcept=0
| Map the given relative URI to an absolute URI. More...
virtual gcc_pure AllocatedPath | MapFS (const char *uri_utf8) const noexcept
| Map the given relative URI to a local file path. More...
gcc_pure AllocatedPath | MapChildFS (const char *uri_utf8, const char *child_utf8) const noexcept
virtual gcc_pure const char * | MapToRelativeUTF8 (const char *uri_utf8) const noexcept=0
| Check if the given URI points inside this storage. More...

## Detailed Description

Definition at line 45 of file StorageInterface.hxx.

## Constructor & Destructor Documentation

## ◆ Storage() [1/2]

Storage::Storage | ( |  | ) |
| default

## ◆ Storage() [2/2]

Storage::Storage | ( | const Storage & |  | ) |
| delete

## ◆ ~Storage()

virtual Storage::~Storage | ( |  | ) |
| inlinevirtual

Definition at line 49 of file StorageInterface.hxx.

## Member Function Documentation

## ◆ GetInfo()

virtual StorageFileInfo Storage::GetInfo | ( | const char * | uri_utf8,
|  | bool | follow
| ) |  |
| pure virtual

Throws #std::runtime_error on error.

Implemented in CompositeStorage.

## ◆ MapChildFS()

gcc_pure AllocatedPath Storage::MapChildFS | ( | const char * | uri_utf8,
|  | const char * | child_utf8
| ) |  | const
| noexcept

## ◆ MapFS()

virtual gcc_pure AllocatedPath Storage::MapFS | ( | const char * | uri_utf8 | ) | const
| virtualnoexcept

Map the given relative URI to a local file path.

Returns AllocatedPath::Null() on error or if this storage does not support local files.

Reimplemented in CompositeStorage.

## ◆ MapToRelativeUTF8()

virtual gcc_pure const char* Storage::MapToRelativeUTF8 | ( | const char * | uri_utf8 | ) | const
| pure virtualnoexcept

Check if the given URI points inside this storage.

If yes, then it returns a relative URI (pointing inside the given string); if not, returns nullptr.

Implemented in CompositeStorage.

## ◆ MapUTF8()

virtual gcc_pure std::string Storage::MapUTF8 | ( | const char * | uri_utf8 | ) | const
| pure virtualnoexcept

Map the given relative URI to an absolute URI.

Implemented in CompositeStorage.

## ◆ OpenDirectory()

virtual StorageDirectoryReader* Storage::OpenDirectory | ( | const char * | uri_utf8 | ) |
| pure virtual

Throws #std::runtime_error on error.

Implemented in CompositeStorage.

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

- storage/StorageInterface.hxx