def seek_file_end(file):
    """Seek to the end of the file."""
    try:
        file.seek(0, 2)
    except ValueError:
        while True:
            data = file.read(4096)
            if not data:
                break
