LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Accessing a tar file in C / C++ (using VFS?) (https://www.linuxquestions.org/questions/programming-9/accessing-a-tar-file-in-c-c-using-vfs-581002/)

traene 08-30-2007 11:54 AM

Accessing a tar file in C / C++ (using VFS?)
 
I want to access archived files from my c++ program. I know that mc (the gnu midnight commander) can do this. In the sources they have a vfs (virtual file system) part. Has anybody some experience with this and can point me to more resources on this?

gnashley 08-30-2007 12:17 PM

Check out the sources for the old GTK-1.2 versions of xfce (3.8.18) and ROX-Filer-1.2.2. for similar implementations. Note that the mc vfs API has changed several times and I never got it to work with ROX-1.2.2. xfc3.8.18 has the feature you want, but probably is using it's own vfs implementation.
You can also do this by using the FUSE filesystem.

tuxdev 08-30-2007 01:25 PM

physfs is a popular VFS library for games.

traene 09-01-2007 04:30 AM

Had a glance at xfce-3.8.18 and physfs for now. I think i will not use xfce-3.8.18 because of dependencies to the gtk lib. I like to make a console app with less dependencies. (However i saw the tar.h and tar.c, which seem to provide the functionality i want.)

I will have a look at physfs (which seems to be rather up to date. (version 1.1.1 from march - 2007).
And maybe afvs (which seems to be a derivate of the vfs in mc.) They do also support fuse. However i have no idea how it works for now. Any ideas, recommended reading?


All times are GMT -5. The time now is 08:03 PM.