Re: Mount some archive and do not show it in "devices" list



On Wed, Aug 20, 2014 at 02:06:42AM +0200, Jehan Pagès wrote:
Hello,

I have been experimenting a little with gio/gvfs. I have an archive
(tar, zip, whatever), and I mount it with
g_file_mount_enclosing_volume(). Well this works well. But then it
shows up in my file manager (Nemo in this case).
How can I request that this virtual file system is not shown in such
software? I could not find this in glib API. My use case would be some
app which just wants to open various archives and interact with files
in these transparently. If an app mounts an archive for its own usage,
you don't want to clutter the user UI (file manager, open/save
dialogs, etc.) with useless mount points, which are only for app
usage, not useful at all for user consumption.
How can I do this, is this possible?

Not that I know of...


Basically I just want to read files in archives. I could also
uncompress them, that's another possibility, but I thought that
reading files without unarchiving in some temporary directory was a
nicer design. Is not gvfs at all good for such use case? Maybe I am on
the wrong path?
Thanks!


gvfs is explicitly designed for handling users' data files; consequently
it is usually left to the user to handle mounting and unmounting of
volumes and these volumes are visible to the user.  What happens if your
program dies unexpectedly while a whole bunch of volumes are mounted?
They would hang around since mounts are per-session.

Basically, although I like the fact that you're putting gvfs to some
interesting use case, I don't think it's the right approach.

The following may point you in the right direction for reading archives:
http://www.hadess.net/2013/12/on-beauty-of-libarchive.html

Regards
-- 
Ross Lagerwall


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]