Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/CommandParser/cmd.cpp
- Revision:
- 43:62de0e05ab6b
- Parent:
- 42:c703a60993b1
- Child:
- 44:c73f2ca79669
diff -r c703a60993b1 -r 62de0e05ab6b src/CommandParser/cmd.cpp --- a/src/CommandParser/cmd.cpp Fri Sep 09 20:44:19 2016 +0000 +++ b/src/CommandParser/cmd.cpp Fri Sep 09 21:20:26 2016 +0000 @@ -278,8 +278,16 @@ printf("\rusage: rm <filename>\n"); return; } - // attempt to remove a user file - GLOBAL_mdot->deleteUserFile(argv[1]); + if ( strcmp(argv[1], "*") == 0 ) { + vector<mDot::mdot_file> userFiles; + userFiles = GLOBAL_mdot->listUserFiles(); + vector<mDot::mdot_file>::iterator pos; + for ( pos = userFiles.begin(); pos != userFiles.end(); ++pos ) { + GLOBAL_mdot->deleteUserFile(pos->name); + } + } else { + GLOBAL_mdot->deleteUserFile(argv[1]); + } } /***************************************************************************** @@ -461,7 +469,7 @@ if( status != true ) { logInfo("(%d)save file failed, status=%d", __LINE__, status); } - + logInfo("Sending Mail To ModbusMasterMailBox, filename=%s", argv[1]); Message_t *mail = ModbusMasterMailBox.alloc(); mail->action = ACTION_READ_FILE;