Add basic file management to the Console
I would like to see working cp, mv, rm commands on the command line
I'd love to work on this -- but I am not sure where to find the relevant code. Anyone know?
@trevortomesh take a look at https://github.com/nesbox/TIC-80/blob/master/src/console.c.
The line https://github.com/nesbox/TIC-80/blob/master/src/console.c#L2357 lists the available commands, and each of them is associated to a console method. I guess you just have to do the same for your commands.
You can read the following methods that might help you writting your own:
- onConsoleDirCommand - when user types
dirorlsit displays the files in the current directory - https://github.com/nesbox/TIC-80/blob/master/src/console.c#L1292 - onConsoleMakeDirectory - when user types
mkdirand creates a new directory - https://github.com/nesbox/TIC-80/blob/master/src/console.c#L1283 - onConsoleDelCommand - when the user types
deland deletes a cart - https://github.com/nesbox/TIC-80/blob/master/src/console.c#L2238
Good luck o/
I would like to see working cp, mv, rm commands on the command line
This would be a great feature