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);
|
|
|
|
|
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);
|
2020-06-28 13:21:27 +00:00
|
|
|
|
|
|
|
virtual int write(int8_t fd, const void *buf, int nbyte);
|
|
|
|
virtual int read(int8_t fd, void *buf, int nbyte);
|
|
|
|
virtual int lseek(int8_t fd, int offset, int whence);
|
2019-02-20 16:51:55 +00:00
|
|
|
|
2017-02-26 16:00:41 +00:00
|
|
|
private:
|
|
|
|
int8_t numCached;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|