2018-02-07 15:20:26 +00:00
|
|
|
#ifndef __NIX_FILEMANAGER_H
|
|
|
|
#define __NIX_FILEMANAGER_H
|
2017-02-26 16:00:41 +00:00
|
|
|
|
|
|
|
#include "filemanager.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-02-07 15:20:26 +00:00
|
|
|
class NixFileManager : public FileManager {
|
2017-02-26 16:00:41 +00:00
|
|
|
public:
|
2018-02-07 15:20:26 +00:00
|
|
|
NixFileManager();
|
|
|
|
virtual ~NixFileManager();
|
2017-12-30 20:20:34 +00:00
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
virtual int8_t openFile(const char *name);
|
|
|
|
virtual void closeFile(int8_t fd);
|
|
|
|
|
|
|
|
virtual const char *fileName(int8_t fd);
|
|
|
|
|
|
|
|
virtual int8_t readDir(const char *where, const char *suffix, char *outputFN, int8_t startIdx, uint16_t maxlen);
|
|
|
|
virtual void seekBlock(int8_t fd, uint16_t block, bool isNib = false);
|
|
|
|
virtual bool readTrack(int8_t fd, uint8_t *toWhere, bool isNib = false);
|
|
|
|
virtual bool readBlock(int8_t fd, uint8_t *toWhere, bool isNib = false);
|
|
|
|
virtual bool writeBlock(int8_t fd, uint8_t *fromWhere, bool isNib = false);
|
|
|
|
virtual bool writeTrack(int8_t fd, uint8_t *fromWhere, bool isNib = false);
|
|
|
|
|
2017-12-29 19:08:49 +00:00
|
|
|
virtual uint8_t readByteAt(int8_t fd, uint32_t pos);
|
|
|
|
virtual bool writeByteAt(int8_t fd, uint8_t v, uint32_t pos);
|
|
|
|
|
2017-12-30 20:20:34 +00:00
|
|
|
virtual uint8_t readByte(int8_t fd);
|
|
|
|
virtual bool writeByte(int8_t fd, uint8_t v);
|
|
|
|
|
2018-02-07 15:20:26 +00:00
|
|
|
void getRootPath(char *toWhere, int8_t maxLen);
|
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
private:
|
|
|
|
int8_t numCached;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|