def execute(self, path, action): if not path: return filer = widgets.filer msg = path.replace(filer.dir.path, "") ret = message.confirm("Delete? ({0}):".format(msg), ["No", "Yes"]) if ret == "Yes": filectrl.delete(path)
def _delete(): """Invoke command line of delete mode.""" filer = widgets.filer cmdline = widgets.cmdline if filer.dir.ismark(): files = filer.dir.get_mark_files() ret = message.confirm("Delete mark files? ", ["No", "Yes"], files) if ret == "No" or ret is None: return filectrl.delete(files) else: cmdline.start(mode.Delete(), filer.file.name)