|
Adafruit Library
|
Read-only identification and root catalogs for decoded floppy images. The caller supplies bounded byte reads from an image file or sector cache. This class does not control a drive, decode flux, or write filesystem data. More...
#include <Adafruit_FloppyImage.h>
Classes | |
| struct | Entry |
| One root-directory entry; valid only during the visitor call. More... | |
Public Types | |
| enum | Format { UNKNOWN, FAT12, AMIGA_OFS, AMIGA_FFS, CBM_DOS, APPLE_DOS33, APPLE_PRODOS } |
| Filesystems identified by their structures, not file extensions. More... | |
| typedef bool(* | Read) (void *context, uint32_t offset, uint8_t *data, size_t length) |
| Read exactly length bytes; return false for missing/bad sectors. | |
| typedef bool(* | Visit) (void *context, const Entry &entry) |
| Visit an entry; return false to stop a successful listing early. | |
Public Member Functions | |
| Adafruit_FloppyImage (Read reader, void *context, uint32_t imageBytes) | |
| Bind a reader without reading or modifying its image. More... | |
| bool | identify () |
| Identify a supported filesystem from validated on-disk structures. More... | |
| bool | listRoot (Visit visitor, void *context) |
| Enumerate the root directory with bounded traversal and read checks. More... | |
| Format | format () const |
| Return the last successfully identified format. More... | |
| const char * | formatName () const |
| Return a human-readable filesystem name without guessing the host OS. More... | |
| const char * | volumeName () const |
| Return the volume label, or an empty string when none is present. More... | |
| const char * | error () const |
| Explain the last failed operation. More... | |
Read-only identification and root catalogs for decoded floppy images. The caller supplies bounded byte reads from an image file or sector cache. This class does not control a drive, decode flux, or write filesystem data.
Filesystems identified by their structures, not file extensions.
| Adafruit_FloppyImage::Adafruit_FloppyImage | ( | Read | reader, |
| void * | context, | ||
| uint32_t | imageBytes | ||
| ) |
Bind a reader without reading or modifying its image.
| reader | Callback for exact byte reads. |
| context | Opaque callback context, owned by the caller. |
| imageBytes | Total accessible image bytes. |
| bool Adafruit_FloppyImage::identify | ( | ) |
Identify a supported filesystem from validated on-disk structures.
| bool Adafruit_FloppyImage::listRoot | ( | Visit | visitor, |
| void * | context | ||
| ) |
Enumerate the root directory with bounded traversal and read checks.
| visitor | Called once per live entry; false requests an early stop. |
| context | Opaque visitor context. |
| Adafruit_FloppyImage::Format Adafruit_FloppyImage::format | ( | ) | const |
Return the last successfully identified format.
| const char * Adafruit_FloppyImage::formatName | ( | ) | const |
Return a human-readable filesystem name without guessing the host OS.
| const char * Adafruit_FloppyImage::volumeName | ( | ) | const |
Return the volume label, or an empty string when none is present.
| const char * Adafruit_FloppyImage::error | ( | ) | const |
Explain the last failed operation.
1.8.13