def get_size(fileobject):
    """get the size of a file in bytes

    Args:
        fileobject ([type]): [description]

    Returns:
        int: the size in bytes
    """
# region def getSize(fileobject):

    fileobject.seek(0,2) # move the cursor to the end of the file
    size = fileobject.tell()
    return size