jw/pkg/cmds/distro/CmdPkg: Add distro pkg ls

Add the distro subcommand class CmdPkg, together with a first
subcommand ls, which prints a list of files contained in a package.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-23 09:18:35 +01:00
commit 881a915098
6 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import annotations
from typing import TYPE_CHECKING
import abc
from typing import Iterable
from .Backend import Backend as Base
if TYPE_CHECKING:
from ..CmdPkg import CmdPkg as Parent
class BePkg(Base):
def __init__(self, parent: Parent):
super().__init__(parent)
async def list_files(self, name: str) -> Iterable[str]:
return await self._list_files(name)
@abc.abstractmethod
async def _list_files(self, name: str) -> Iterable[str]:
pass