def get_file_size(file_obj):
    if hasattr(file_obj, 'seek') and hasattr(file_obj, 'tell'):
        try:
            curr = file_obj.tell()
            file_obj.seek(0, os.SEEK_END)
            size = file_obj.tell()
            file_obj.seek(curr)
            return size
        except IOError:
            return
Analyze file-like object and attempt to determine its size.
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/utils/file_proxy.py/get_file_size