Return only files from a directory listing.

    Arguments:

        root (str): Path to directory. Can be relative or absolute.
        **kwargs: Any additional arguments to be passed to ls().

    Returns:

        list of str: A list of file paths.

    Raises:

        OSError: If root directory does not exist.

def lsfiles(root=".", **kwargs):
    """
    Return only files from a directory listing.

    Arguments:

        root (str): Path to directory. Can be relative or absolute.
        **kwargs: Any additional arguments to be passed to ls().

    Returns:

        list of str: A list of file paths.

    Raises:

        OSError: If root directory does not exist.
    """
    paths = ls(root=root, **kwargs)
    if isfile(root):
        return paths
    return [_path for _path in paths if isfile(path(root, _path))]