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);
|
|
|
|
|
2020-06-27 22:00:59 +00:00
|
|
|
virtual void truncate(int8_t fd);
|
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
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);
|
|
|
|
|
2019-02-21 03:06:55 +00:00
|
|
|
virtual bool setSeekPosition(int8_t fd, uint32_t pos);
|
2019-02-20 16:51:55 +00:00
|
|
|
virtual void seekToEnd(int8_t fd);
|
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
private:
|
|
|
|
int8_t numCached;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|