bring inline with outer filesystem changes

This commit is contained in:
Jorj Bauer 2020-06-28 08:30:18 -04:00
parent 7cd20333d6
commit 1e762440a5
2 changed files with 8 additions and 0 deletions

View File

@ -69,6 +69,11 @@ void TeensyFileManager::closeFile(int8_t fd)
cachedNames[fd][0] = '\0';
}
void TeensyFileManager::truncate(int8_t fd)
{
/* Not used in the code anywhere, yet, and unimplemented here... */
}
const char *TeensyFileManager::fileName(int8_t fd)
{
if (fd < 0 || fd >= numCached)
@ -332,6 +337,7 @@ bool TeensyFileManager::writeByteAt(int8_t fd, uint8_t v, uint32_t pos)
return (rawFile.write(&v, 1) == 1);
}
// FIXME: the semantics of this are wrong - lots of 'return false' for a uint8_t
uint8_t TeensyFileManager::readByte(int8_t fd)
{
// open, seek, read, close.

View File

@ -12,6 +12,8 @@ class TeensyFileManager : public FileManager {
virtual int8_t openFile(const char *name);
virtual void closeFile(int8_t fd);
virtual void truncate(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);