Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No rename method on GoogleCloudStorage #1188

Closed
wieczorek1990 opened this issue Oct 26, 2022 · 1 comment
Closed

No rename method on GoogleCloudStorage #1188

wieczorek1990 opened this issue Oct 26, 2022 · 1 comment

Comments

@wieczorek1990
Copy link

I'm using the following to allow renaming:

@deconstruct.deconstructible
class GoogleCloudStorage(gcloud.GoogleCloudStorage):
    def path(self, name) -> typing.AnyStr:
        raise NotImplementedError()

    def get_accessed_time(self, name) -> datetime.datetime:
        raise NotImplementedError()

    def rename(self, old_name: str, new_name: str) -> None:
        blob = self.bucket.blob(old_name)
        self.bucket.rename_blob(blob, new_name)

Requesting feature.

@jschneier
Copy link
Owner

Am sticking to the Django interface, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants