harababurel/gcsf

record the associated url for a file somehow

Opened this issue · 0 comments

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.