astrada / google-drive-ocamlfuse

FUSE filesystem over Google Drive
https://astrada.github.io/google-drive-ocamlfuse/
MIT License
5.52k stars 351 forks source link

Feature Request: sync status indication or loading bar #44

Open jay4fusion opened 10 years ago

jay4fusion commented 10 years ago

I have a suggestion for a feature: Some way of notifying the user of the current sync status (like % complete) so the user knows when all of the files are finished syncing.

I have > 20 GB on my google drive, and it includes data and figures that are large files. When I am working on my linux machine it would be nice to know when all my changes on my other machines are available

Thank you for your time! I really enjoy google-drive-ocamlfuse! It really helps me out :)

jay4fusion commented 10 years ago

I think just a simple option to the command line utility to print this info would be very useful

bericp1 commented 10 years ago

I'll just drop a +1 here.

astrada commented 10 years ago

Unfortunately, I don't think it's possible to add a progress bar visible in some kind of UI (console or GUI). My application provides a FUSE filesystem, and a filesystem does not provide a callback to report progress to the user interface. Moreover my application is single threaded, because the multi-threading version of the library I'm using is not stable, so there would be no way to notify the calling process in the middle of a download or an upload. Sorry.

jay4fusion commented 10 years ago

I see, thanks for letting me know!

Thank you for the great plugin! Jay

On Thu, Jan 9, 2014 at 3:07 PM, Alessandro Strada notifications@github.comwrote:

Unfortunately, I don't think it's possible to add a progress bar visible in some kind of UI (console or GUI). My application provides a FUSE filesystem, and a filesystem does not provide a callback to report progress to the user interface. Moreover my application is single threaded, because the multi-threading version of the library I'm using is not stable, so there would be no way to notify the calling process in the middle of a download or an upload. Sorry.

— Reply to this email directly or view it on GitHubhttps://github.com/astrada/google-drive-ocamlfuse/issues/44#issuecomment-31976305 .

fastcat commented 10 years ago

A suggestion: provide an API for a separate UI process to query sync status. A couple ways you could do this:

  1. Create a unix domain socket in the root of the FUSE mount which the FUSE daemon itself is listening to. Not sure if this introduces any circular dependencies unmounting, though.
  2. Create a unix domain socket in a well known location (/tmp) that can be used to query status. Creating things with predictable names in /tmp has security problems, though.
  3. Newer versions of FUSE support handling custom ioctls in the fs, you could provide some custom ioctls issued to a magic file or the root mount directory to query the status. Supporting ioctls to directories requires even newer versions than ioctls to files, but either should work on any current linux distro.
  4. For maximum compatibility with things other than Linux (e.g. MacFUSE), provide a magic file in the root of the mounted FS that, when read, provides status.

Note that, for all the above options that add files to the FS, it is OK in fuse to have a filename that does not show in directory listings but is accessible when opened by name. Or you could have the status socket/file visible, if that's not a problem.

astrada commented 10 years ago

Thanks for your suggestion. The main problem is that I'm using an OCaml binding of FUSE that's not maintained anymore and I don't know C well enough to patch the library myself.

dairefagan commented 4 years ago

I know this is a very old feature request, but I wanted to +1 it.

I am currently relying on monitoring ocamlfuse's bandwidth usage with nethogs to determine when it has finished uploading all of the files.

ericdallo commented 3 years ago

yeah, a status of the current files being uploaded/download would be enough I think