openHASP
openHASP copied to clipboard
File handling commands
As part of adding SD support, it occurred to me that it would be useful to have some basic file handling commands. e.g.: list - Returning a json object with file names & sizes on either SD card or internal storage (spiffs/littlefs) - Already implemented as a dir command and used by the file editor, but doesn't display file size. copy - Copy file to/from SD card and returns a json object of file name (including new path ?) and size move - As per copy, but deleting source file if copy is successful. delete - Already available within the file editor, but no callable from mqtt/telnet/terminal (unless I've missed something)
copy and move commands would only be of use for those using an SD card. list (or an enhanced dir) and copy have a wider appeal to other users.