commands.cc
/*
** delete_current_file - attempt to delete current file.
*/
attempt to delete current file.
attempt to delete current file .
static void delete_current_file(DirList *dl)
{
    const char *file = get_file_name(dl);
    if (strcmp(file, ".")  == 0 || strcmp(file, "..") == 0)
    {
        message("`deletion' of `.' and `..' is not allowed");
        move_cursor(dl->savedYPos(), dl->savedXPos());
        synch_display();
        return;
    }
    String msg = String("delete `") + file + "'? (y|n) ";
    if (is_directory(file) && yes_or_no(msg))
        delete_directory(dl, file);
    else if (yes_or_no(msg))
        delete_file(dl, file);
    else
         Don\'t do the delete.
        move_cursor(dl->savedYPos(), dl->savedXPos());
    synch_display();
}
static void delete_current_file ( DirList * dl ) { const char * file = get_file_name ( dl ) ; if ( strcmp ( file , " " ) == 0 || strcmp ( file , " " ) == 0 ) { message ( " " ) ; move_cursor ( dl -> savedYPos ( ) , dl -> savedXPos ( ) ) ; synch_display ( ) ; return ; } String msg = String ( " " ) + file + " " ; if ( is_directory ( file ) && yes_or_no ( msg ) ) delete_directory ( dl , file ) ; else if ( yes_or_no ( msg ) ) delete_file ( dl , file ) ; else move_cursor ( dl -> savedYPos ( ) , dl -> savedXPos ( ) ) ; synch_display ( ) ; }
delete_current_file - attempt to delete current file.
delete_current_file - attempt to delete current file .
// // Don\'t do the delete. //