Get information about a remote file.
(self, remote_path)
| 413 | return True |
| 414 | |
| 415 | def get(self, remote_path): |
| 416 | """Get information about a remote file.""" |
| 417 | client = create_discovery_storage_client() |
| 418 | bucket, path = get_bucket_name_and_path(remote_path) |
| 419 | |
| 420 | try: |
| 421 | return client.objects().get(bucket=bucket, object=path).execute() |
| 422 | except HttpError as e: |
| 423 | if e.resp.status == 404: |
| 424 | return None |
| 425 | |
| 426 | raise |
| 427 | |
| 428 | def delete(self, remote_path): |
| 429 | """Delete a remote file.""" |
no test coverage detected