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

record the associated url for a file somehow #64

Open
mcarifio opened this issue Mar 24, 2019 · 0 comments
Open

record the associated url for a file somehow #64

mcarifio opened this issue Mar 24, 2019 · 0 comments

Comments

@mcarifio
Copy link

First, I was able to mount a google drive based on the directions. Cool. The systemd unit file will also be helpful. Thank you.

Next, it would be useful to create a "back pointer" to a url on the google drive and some way to recover it at the command line. I scanned the code a little bit. It uses fuse but not fuse_mt. I was thinking you could introduce an extended file attribute and attach it to the file that way, see https://docs.rs/fuse_mt/0.4.4/x86_64-unknown-linux-gnu/fuse_mt/enum.Xattr.html. Then whenever you write a file, you capture its associated url and stash it in user.drive_url. If you have that, then you can open the file in a browser with something like xdg_open $(getfattr -n user.drive_url --only-value). Alternatively you introduce a "supporting file" containing the url. For a file file.doc, it's url would be file.doc.gdrive_url. It's a little cruftier.

I'm new to rust, so this might not be the right way to do it. But this would be a useful thing to have.

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

1 participant