218
218
def has(self, relpath):
219
219
raise NotImplementedError("has() is abstract on %r" % self)
221
def get(self, relpath, **hints):
221
def get(self, relpath):
222
222
"""Get the file at the given relative path.
224
224
:param relpath: The relative path to the file
225
:param hints: A TransportHints applicable to the get.
226
follow_redirections: False
227
will raise RedirectRequested instead of silently
228
following the redirections.
230
code, response_file = self._get(relpath, None, **hints)
226
code, response_file = self._get(relpath, None)
231
227
return response_file
233
def _get(self, relpath, ranges, tail_amount=0, **hints):
229
def _get(self, relpath, ranges, tail_amount=0):
234
230
"""Get a file, or part of a file.
236
232
:param relpath: Path relative to transport base URL
237
233
:param ranges: None to get the whole file;
238
234
or [(start,end)] to fetch parts of a file.
239
235
:param tail_amount: to fetch that amount from file tail.
240
:param hints: A dict of hints (see get).
242
237
:returns: (http_code, result_file)