paulscottrobson / eris

Eris is an open source 16 bit retrocomputer design which can be built cheaply and easily
MIT License
11 stars 4 forks source link

New File Commands needed #26

Closed OzHawk closed 4 years ago

OzHawk commented 4 years ago

We can get a 'dir' of files, load files and save files.

How do we copy files (from internal FS to SD FS) or delete files?

Is this possible in the current configuration, or does it require changes?

paulscottrobson commented 4 years ago

If there's no delete command it's because I forgot. There's no way of doing it. Adding the functionality isn't difficult.

Copying files in is designed to be done in one of two ways. One is downloading it over Wifi the other is by putting it in the build and having it copied into SPIFFS. Copy out is done by sending it over the serial port in an encoded format.

This is because I don't have a board with an SDCard. The reality is that the file system is a complete cheat - it is mostly written in C and invoked on an active write - there's no Eris code accessing SPIFFS or Wifi directly and manipulating blocks on a storage device, it's just done in C. It would be fairly simple (and preferable) to replace the routines to load/save etc. (see Eris Hardware.odt) with functionally equivalent ones that access the SD card, if the library supports them.

paulscottrobson commented 4 years ago

Added a delete command to BASIC and esp32/glibc implementations. There are only two storage types in Eris ; wifi external and local internal, so SDCard would replace SPIFFS rather than work with it.