def list_files(client, filename=None):
    """List files in Creo's current working directory.

    Args:
        client (obj):
            creopyson Client.
        filename (str, optional):
            File name filter (wildcards_allowed: True).
            Defaults: all files are listed.

    Returns:
        (list:int): List of files.

    """
    data = {"filename": "*"}
    if filename is not None:
        data["filename"] = filename
    return client._creoson_post("creo", "list_files", data, "filelist")