(lang: str)
| 1425 | |
| 1426 | items = list_top_largest_files(root, top_n=max(1, n), max_depth=depth, include_hidden=include_hidden, follow_symlinks=follow, ignore=ignore, only=only) |
| 1427 | out = format_top_list(items) or t('placeholder_empty', lang) |
| 1428 | print(out) |
| 1429 | export_path = prompt_text(lang, "prompt_export", "") |
| 1430 | export_text(lang, export_path, out) |
| 1431 | |
| 1432 | def run_empty_dirs(lang: str) -> None: |
| 1433 | print(t("empty_title", lang)) |
| 1434 | root = prompt_path(lang, Path(".")) |
| 1435 | if not root.exists(): |
| 1436 | print(t("err_path_missing", lang, path=root)) |
| 1437 | return |
| 1438 | depth = prompt_int(lang, 8) |
| 1439 | hide_dot = yesno(lang, "prompt_hide_dot", False) |
| 1440 | include_hidden = not hide_dot |
| 1441 | follow = yesno(lang, "prompt_follow", False) |
| 1442 | ignore = normalize_patterns(prompt_text(lang, "prompt_ignore", "")) |
| 1443 | |
| 1444 | empties = find_empty_folders(root, max_depth=depth, include_hidden=include_hidden, follow_symlinks=follow, ignore=ignore) |
| 1445 | print(t("empty_found", lang, n=len(empties))) |
| 1446 | out = "\n".join(str(p) for p in empties) if empties else "" |
| 1447 | if out: |
| 1448 | print(out) |
no test coverage detected