The notes of a Controller Pak, stored in a directory, with the settings note in another.
More...
#include <controllerpak.h>
The notes of a Controller Pak, stored in a directory, with the settings note in another.
◆ ControllerPak()
Select note directories without creating or reading them.
- Parameters
-
| directory | The directory of the notes, created at the first write. |
| settingsDirectory | The directory of PAK_SETTINGS_NOTE, or empty for the directory of the other notes. |
◆ ReadNote()
Validate the note's integrity header and checksum, attempting to delete corrupt saves.
- Parameters
-
| name | An ASCII note filename without path separators or reserved metadata names. |
| validate | Optional semantic validator; rejection attempts deletion under the note lock. |
- Returns
- Native note bytes, or an empty optional when missing, unreadable, or rejected.
◆ WriteNote()
Atomically write a complete note with its integrity header and checksum.
- Parameters
-
| name | An ASCII note filename without path separators or reserved metadata names. |
| bytes | Non-empty native note bytes, at most PAK_IMAGE_BYTES. |
- Returns
- Whether the note was written.
◆ DeleteNote()
| bool coastline::ControllerPak::DeleteNote |
( |
const std::string & | name | ) |
const |
- Parameters
-
| name | An ASCII note filename without path separators or reserved metadata names. |
- Returns
- Whether the note was deleted.
◆ Notes()
- Returns
- The notes of the pak, in the order of their names.
◆ FreeBytes()
| std::size_t coastline::ControllerPak::FreeBytes |
( |
| ) |
const |
◆ Subdirectory()
Store independent notes beneath the Controller Pak directory without using its capacity.
- Parameters
-
| directory | A relative child directory for notes excluded from the parent inventory. |
- Returns
- A pak whose notes and settings both use the child directory.
The documentation for this class was generated from the following file: