Re: Opening aarchives as virtual folders.



> So basicly:
> 1) Is it possible to open archives as virtual folders in gnome-vfs 
> programatically?

yep, if you use an uri like
file:///home/user/somefile.tar.gz#gzip:#tar:/ things should work (if you
want to experiment with that, use the test-directory program which comes
with gnome-vfs source - you need to use an absolute path with
test-directory if you don't wat to get a segfault). Typing such an uri
in Nautilus is supposed to work, but there are a few issues, the main
one to be aware of is that you can't browse the root directory of the
archive that way, so your uri needs to end with #gzip:#tar:/some/dir.

> 2) How would such a thing be done, and how hard would itbe to extend it for 
> iso's etc.. (or are there already plugins for that?)

To my knowledge, there is not a plugin for isos, though you can already
mount isos using loopback devices under linux (but you need to be root
to do that). It should be fairly easy to implement a gnome-vfs module to
handle iso images if you need it, see the part about writing a gnome-vfs
module in gnome-vfs docs
(http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0/modules.html)
In short, you only need to implement a set of helper functions to open,
read, close a file, open, read, close a dir, get info about a file, ...

> 3) Is it possible to do this in nautilus?

If you write a gnome-vfs module which implements the appropriate
functions (I don't remember which one exactly are needed :(, Nautilus
will be able to automatically use your module to browse whatever you
want.

Christophe

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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