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

GDriveFileSystem support for shared files / shortcuts #236

Open
simone-viozzi opened this issue Oct 24, 2022 · 1 comment
Open

GDriveFileSystem support for shared files / shortcuts #236

simone-viozzi opened this issue Oct 24, 2022 · 1 comment
Labels
feature request fs fsspec implementation

Comments

@simone-viozzi
Copy link
Contributor

Hi, does GDriveFileSystem support manipulation of files in the shared with me folder? Like copy from my drive to a folder shared with me.

If not, I can create a shortcut in my drive and use the shortcut as path for the file / folder?

From the tries I have done, the second option doesn't work, GDriveFileSystem does not take care of getting the targetId of the shortcut etc..

I would like shortcut to be transparent proxies to the real file / folder, so that for example ls on the shortcut of a folder give me the content of it.
Things get complicated with other methods like:

  • you can copy a shortcut of a folder, but not the folder itself (at least not in one API call)

Reference:

@aripollak
Copy link
Contributor

I don't think PyDrive2 currently supports this functionality automatically, but it would be great if it did. Having a method like this on GoogleDriveFile would be super helpful as a start:

    def FollowShortcut(self):
        if self["mimeType"] == "application/vnd.google-apps.shortcut":
            self.FetchMetadata(fields="shortcutDetails")
            return GoogleDriveFile(self.auth, {"id": gdrive_file["shortcutDetails"]["targetId"]})
        else:
            return self

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

No branches or pull requests

3 participants