async function promptDelete() {
    if (noFilesCheck())
        return;
    
    const msgAsk = 'Do you really want to delete the ';
    const msgSel = 'selected ';
    
    const files = DOM.getActiveFiles();
    const names = DOM.getFilenames(files);
    const n = names.length;
    
    let msg;
    
    if (n) {
        let name = '';
        
        for (let i = 0; i < 5 && i < n; i++)
            name += '\n' + names[i];
        
        if (n >= 5)
            name += '\n...';
        
        msg = msgAsk + msgSel + n + ' files/directories?\n' + encode(name);
    } else {
        const current = DOM.getCurrentFile();
        const isDir = DOM.isCurrentIsDir(current);
        const getType = (isDir) => isDir ? 'directory' : 'file';
        
        const type = getType(isDir) + ' ';
        
        const name = DOM.getCurrentName(current);
        
        msg = msgAsk + msgSel + type + name + '?';
    }
    
    const [cancel] = await Dialog.confirm(msg);
    
    if (cancel)
        return;
    
    deleteSilent(files);
}
prompt and delete current file or selected files

@currentFile