src/args.cpp
////////////////////////////
// remove a to-do list file
remove a to-do list file
remove a to - do list file
void removeList()
{
    TodoList *list = Core::list(name());
    if (!list->exists()){
        cout << ANSI_RED << "Todo List '" << list->name;
        cout << "' does not exist!\n" << ANSI_RESET;
        return;
    }
    string choice;
    cout << "Remove list? [Y/n] > ";
    cin >> choice;
    if (choice != "Y"){
        cout << "Not removing.\n";
        return;
    }
    if (remove(list->getPath().c_str()) != 0){
        cout << ANSI_RED << "Failed to remove list!\n" << ANSI_RESET;
        return;
    }
    cout << "List removed.\n";
}
void removeList ( ) { TodoList * list = Core :: list ( name ( ) ) ; if ( ! list -> exists ( ) ) { cout << ANSI_RED << " " << list -> name ; cout << " \n " << ANSI_RESET ; return ; } string choice ; cout << " " ; cin >> choice ; if ( choice != " " ) { cout << " \n " ; return ; } if ( remove ( list -> getPath ( ) . c_str ( ) ) != 0 ) { cout << ANSI_RED << " \n " << ANSI_RESET ; return ; } cout << " \n " ; }
remove a to-do list file
remove a to - do list file