cleanup.RdFunction to clean up files and directories created by the chesstrainer package.
cleanup(config=FALSE, colors=FALSE, seqdir=FALSE, history=FALSE,
mpg123=FALSE, stockfish=FALSE, cache=FALSE)logical to determine if the config file should be removed.
logical to determine if the color settings file should be removed.
logical to determine if the default directory where sequences are stored (and all files therein) should be removed.
logical to determine if the directory where the session histories of players are stored (and all files therein) should be removed.
logical to determine if the directory where mpg123 is installed (and all files therein) should be removed.
logical to determine if the directory where Stockfish is installed (and all files therein) should be removed.
logical to determine if the cache directory (and all files therein) should be removed.
The function can be used to clean up files and directories created by the chesstrainer package.
If the function is called with all argument to set to FALSE (the default), then it will enter an interactive mode. Prompts are then issued in the console to determine which files and directories should be removed.
If at least one argument is set to TRUE, then the arguments determine which files and directories should be removed non-interactively.
Removing the config file or the colors settings file may be useful in case these files were corrupted with nonsensical settings. The files will be recreated (with default values) when restarting the trainer.
Be careful with removing the other files and directories! Once deleted, they cannot be recovered.
Removing mpg123 or Stockfish with this function only removes the installations made via install_mpg123 and install_stockfish. It does not touch any system files.
The function does not return an object.
# run the cleanup function in interactive mode
if (FALSE) { # \dontrun{
cleanup()
} # }