Retrieve the file size
 @param options [Hash]
 @return [Integer] the size of the requested file
769298
def get_file_size(options)
        url = options.fetch(:url)
        headers = options.fetch(:headers)
        file_size = options.fetch(:file_size)

        case url.scheme
        when 'file'
          File.size(url.path)
        when /https?/
          response = Typhoeus.head(url.to_s, headers: headers)
          length_value = response.headers['Content-Length'] || file_size
          length_value.to_i
        else
          raise URI::BadURIError, "Unknown URI scheme: #{url.scheme}"
        end
      end
976948
def fetch_size fsz, &block
    obj = self.dup
    obj.instance_variable_set :@fetch_size, fsz
    ret obj, &block
  end
1085601
def size
      case self.body
      when String then self.body.length
      when StringIO then self.body.length
      when File then self.body.size
      else 0
      end
    end
73036
def size
      size = {
        width:  @width,
        height: @height
      }

      # Specific size
      unless @options[:width].nil? && @options[:height].nil?
        size[:width]  = @options[:width].nil?  ? calculate_width(@options[:height]) : @options[:width]
        size[:height] = @options[:height].nil? ? calculate_height(@options[:width]) : @options[:height]
      end

      size
    end
120754
def _get_file_size(file_path):
    

    size = getsize(file_path)

    file_size = bytearray(4)
    pack_into(b"I", file_size, 0, size)

    return file_size
8616
def get_size(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not hasattr(self._file_object, 'get_size'):
      if not self._size:
        current_offset = self.get_offset()
        self.seek(0, os.SEEK_END)
        self._size = self.get_offset()
        self.seek(current_offset, os.SEEK_SET)
      return self._size

    return self._file_object.get_size()
688207
def size(filename, use_cache_only=False):
    """"""
    filename = unmap_file(filename)
    if filename not in file_cache:
        if not use_cache_only: cache_file(filename)
        if filename not in file_cache:
            return None
        pass
    return len(file_cache[filename].lines['plain'])
1038299
def file_sizes(self):
        """"""
        size = sum(map(os.path.getsize, self.file_list))
        return size / 1024 / 1024
66215
def size_for_work(work_id)
        argz = { fl: "id, #{file_size_field}",
                 fq: "{!join from=#{member_ids_field} to=id}id:#{work_id}" }
        files = ::FileSet.search_with_conditions({}, argz)
        files.reduce(0) { |sum, f| sum + f[file_size_field].to_i }
      end
700260
def get_size(self):
        
        if self._size is None:
            self._size = self._filepath.stat().st_size
        return self._size
1334398
def size(self):
        ''''''
        try:
            return os.fstat(self.file.fileno()).st_size
        except io.UnsupportedOperation:
            pass

        if is_seekable(self.file):
            with wpull.util.reset_file_offset(self.file):
                self.file.seek(0, os.SEEK_END)
                return self.file.tell()

        raise OSError('Unsupported operation.')
243714
def sizes
      @attrs.fetch(:sizes, []).each_with_object({}) do |(key, value), object|
        object[key] = Size.new(value)
      end
    end
2565
def size(filename)
      voidcmd("TYPE I")
      resp = sendcmd("SIZE " + filename)
      if resp[0, 3] != "213" 
	raise FTPReplyError, resp
      end
      return resp[3..-1].strip.to_i
    end
519710
def get_filesize(self, f):
        
        try:
            filesize = float(f.get_size())
            return float("%.2f" % (filesize / 1024))
        except (POSKeyError, TypeError, AttributeError):
            return 0.0
1106253
def get_file_size(filename):
    
    if os.path.isfile(filename):
        return convert_size(os.path.getsize(filename))
    return None
409738
def _get_file_size(self):
        
        file_size = retry(self._retry_count)(_get_content_length)(
            self._session, self.url, self._timeout
        )
        file_size = int(file_size)
        if file_size == 0:
            with io.open(self._file_path, 'a', encoding='utf-8'):
                pass
        return file_size
1211071
def get_size(
            self,
            bucket: str,
            key: str
    ) -> int:
        
        blob_obj = self._get_blob_obj(bucket, key)
        return blob_obj.size