def get_file_size(self, file_object):
        original_position = None
        try:
            # We have to seek to the end of the file to get its length.
            original_position = file_object.tell()
            file_object.seek(0, 2)
            return file_object.tell()
        finally:
            if original_position is not None:
                file_object.seek(original_position)
Returns the file size for the given file object.
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/log_processing.py/FileSystem.get_file_size