Retrieves the details of an existing file object. Supply the unique file ID from a file, and
Stripe will return the corresponding file object.
184038
public static File retrieve(String id, Map<String, Object> params, RequestOptions options)
      throws StripeException {
    return request(RequestMethod.GET, instanceUrl(File.class, id), params, File.class, options);
  }
536333
def get(self, file):
        
        uri = "{api}/repos/{origin}/contents/{path}".format(
            api=self.github_api_url,
            origin=self.origin,
            path=file.path
        )
        params = {
            "ref": file.branch
        }
        data = self.request("GET", uri, params=params)
        # We update the file blob because it exists and we need it for update
        if data.status_code == 200:
            data = json.loads(data.content.decode("utf-8"))
            file.blob = data["sha"]
        elif data.status_code == 404:
            pass
        else:
            decoded_data = json.loads(data.content.decode("utf-8"))
            return self.ProxyError(
                data.status_code, (decoded_data, "message"),
                step="get", context={
                    "uri": uri,
                    "params": params
                }
            )
        return file
865521
public static Event retrieve(String id, RequestOptions options) throws StripeException {
    return retrieve(id, null, options);
  }
1155997
def _get_data(self, file_id):
    
        '''  '''
        
        title = '%s._get_data' % self.__class__.__name__
        
    # request file data
        try:
            record_data = self.drive.get_media(fileId=file_id).execute()
        except:
            raise DriveConnectionError(title)
        
        return record_data
720542
def _get_metadata(self, file_id, metadata_fields=''):
        
        '''  '''
        
        title = '%s._get_metadata' % self.__class__.__name__
        
    # construct fields arg
        if not metadata_fields:
            metadata_fields = ','.join(self.object_file.keys())
        else:
            field_list = metadata_fields.split(',')
            for field in field_list:
                if not field in self.object_file.keys():
                    raise ValueError('%s(metadata_fields="%s") is not a valid drive file field' % (title, field))
    
    # send request
        try:
            metadata_details = self.drive.get(fileId=file_id, fields=metadata_fields).execute()
        except:
            raise DriveConnectionError(title)
        
        return metadata_details
319362
def retrieve_file(options)
        file_uri = options.fetch(:url)
        file_size = options.fetch(:file_size)

        retrieved = 0
        File.open(file_uri.path, 'rb') do |f|
          until f.eof?
            chunk = f.read(chunk_size)
            retrieved += chunk.length
            yield(chunk, retrieved, file_size)
          end
        end
      end
1040916
public static Invoice retrieve(String invoice) throws StripeException {
    return retrieve(invoice, (Map<String, Object>) null, (RequestOptions) null);
  }
824826
public static File create(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    return multipartRequest(RequestMethod.POST, classUrl(File.class, Stripe.getUploadBase()),
        params, File.class, options);
  }
241132
def get_file(self, secure_data_path, version=None):
        

        query = self._get_file(secure_data_path, version)
        resp = query.headers.copy()
        resp = self._parse_metadata_filename(resp)
        resp['data'] = query.content

        return resp
1255462
@Override
  public File getFile() throws IOException {
    String realPath = RequestUtils.getRealPath(this.servletContext, this.path);
    return new File(realPath);
  }
801688
def api_retrieve(self, api_key=None):
		
		api_key = api_key or self.default_api_key

		return self.stripe_class.retrieve(
			id=self.id, api_key=api_key, expand=self.expand_fields
		)
333713
def sync_from_stripe_data(cls, data, field_name="id"):
		
		current_ids = set()

		if data.get(field_name, None):
			# stop nested objects from trying to retrieve this object before initial sync is complete
			current_ids.add(cls._id_from_data(data.get(field_name)))

		instance, created = cls._get_or_create_from_stripe_object(
			data, field_name=field_name, current_ids=current_ids
		)

		if not created:
			instance._sync(cls._stripe_object_to_record(data))
			instance._attach_objects_hook(cls, data)
			instance.save()
			instance._attach_objects_post_save_hook(cls, data)

		return instance
1309396
def get_file(self, *args, **kwargs):
        """"""
        return get_file(*args, **self._merge_overrides(**kwargs)).run()
65197
def file_id(self):
        
        if self.type.lower() == "directory":
            return None
        if self.file_uuid is None:
            raise exceptions.MetsError(
                "No FILEID: File %s does not have file_uuid set" % self.path
            )
        if self.is_aip:
            return os.path.splitext(os.path.basename(self.path))[0]
        return utils.FILE_ID_PREFIX + self.file_uuid
260146
def file_request(self):
        
        response = requests.get(
            self.__base_url,
            headers=self.__headers,
            stream=True)

        return response.raw.read(), response.headers
638342
def _get_member_file_data(member_data, id_filename=False):
        
        file_data = {}
        for datafile in member_data['data']:
            if id_filename:
                basename = '{}.{}'.format(datafile['id'], datafile['basename'])
            else:
                basename = datafile['basename']
            if (basename not in file_data or
                    arrow.get(datafile['created']) >
                    arrow.get(file_data[basename]['created'])):
                file_data[basename] = datafile
        return file_data
531105
def getFileHandle(self, dataFile, openMethod):
        
        if dataFile in self._memoTable:
            handle = self._memoTable[dataFile]
            self._update(dataFile, handle)
            return handle
        else:
            try:
                handle = openMethod(dataFile)
            except ValueError:
                raise exceptions.FileOpenFailedException(dataFile)

            self._memoTable[dataFile] = handle
            self._add(dataFile, handle)
            if len(self._memoTable) > self._maxCacheSize:
                dataFile = self._removeLru()
                del self._memoTable[dataFile]
            return handle