# -*- coding: utf-8 -*-
# ~ Jesse K. Rubin ~ Pretty Useful Python

from typing import Any
from typing import List
from typing import Optional
from typing import Tuple

from pupy._typing import Flint


def fmt_bytes(num: Flint) -> str: ...
def fmt_file_size(filepath: str) -> str: ...
def fmt_seconds(t1: float, t2: Optional[float] = ...) -> str: ...
def path2name(path_str: str) -> str: ...
def parent_dirpath(fdpath: str) -> str: ...
def timestamp(ts: Optional[float] = ...) -> str: ...
def ls(dirpath: str = ..., abs: bool = ...): ...
def ls_files(dirpath: Any, abs: bool = ...): ...
def ls_dirs(dirpath: str = ..., abs: bool = ...) -> Any: ...
def ls_files_dirs(dirpath: str) -> Tuple[List[str], List[str]]: ...
def link_dir(link: Any, target: Any): ...
def link_dirs(link_target_tuples: Any): ...
def link_file(link: Any, target: Any): ...
def link_files(link_target_tuples: Any): ...
def unlink_dir(link_path: str) -> Any: ...
def unlink_dirs(link_paths: Any): ...
def unlink_file(link: Any): ...
def unlink_files(links: Any): ...
def sync(src: Any, dest: Any): ...

class LinkedTmpDir:
    dirpath: Any = ...
    dirname: Any = ...
    file_links: Any = ...
    dir_links: Any = ...
    def __init__(
        self,
        suffix: Optional[Any] = ...,
        prefix: Optional[Any] = ...,
        dir: Optional[Any] = ...,
        link_targets: Optional[Any] = ...,
    ) -> None: ...
    def __enter__(self): ...
    def __exit__(self, exc: Any, value: Any, tb: Any) -> None: ...
    def cleanup(self) -> None: ...
