from pathlib import Path


def file_size(p: Path) -> int:  # pragma: no cover
    """Query the file size of a specific file

    Parameters
    ----------
    p : Path
        path to a file that exists on disk.

    Raises
    ------
    FileNotFoundError
        if the file does not exist

    Returns
    -------
    int
        nbytes the file consumes on disk.
    """
    if not p.is_file():
        err = f'Cannot query size of: {str(p)}. File does not exist'
        raise FileNotFoundError(err)
    return p.stat().st_size