Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by dul.. » Tue, 15 Dec 1998 04:00:00



Hi,

I can't find any library that does what I want so
I'm asking for your help.

I would like my program to save to a single file.
Currently it creates many directories and files to
do the saving.

Microsoft's OLE's compound file works well, but
it's not on Linux.  Can you suggest a location/name?

Thanks,
Ching
email ching at aristotech
email dot com

 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by Frederick W. Reimer,S » Wed, 16 Dec 1998 04:00:00


Oh, you're going to have to do much better than that.  Excatly what do
you want to do?  What are you saving?  Give us some examples.

> Hi,

> I can't find any library that does what I want so
> I'm asking for your help.

> I would like my program to save to a single file.
> Currently it creates many directories and files to
> do the saving.

> Microsoft's OLE's compound file works well, but
> it's not on Linux.  Can you suggest a location/name?


 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by dul.. » Wed, 16 Dec 1998 04:00:00


Hi,

I'm looking for some sort of file-system-within-a-file
type of library.  Some thing that lets me create directories
and files (inside a file); modify, append, shrink, delete, add
those files.  I don't really need permissions on the files/
directories.

For example:
A photo program (my program is EDA related, but I think
this fake photo program is easier to describe) might want to
create a directory for each "topic" and the pictures are
stored inside those directories.  To make it easier to copy
its saved data around, it is preferrable to have all this
directory/file stuff be inside 1 file.

Currently I'm using tar on Linux: I untar my single file into
directories and files, modify with regular file commands.  And
then retar the whole thing when done.  This is proving to be
extremely clumsy.

Thanks.


> Oh, you're going to have to do much better than that.  Excatly what do
> you want to do?  What are you saving?  Give us some examples.


> > Hi,

> > I can't find any library that does what I want so
> > I'm asking for your help.

> > I would like my program to save to a single file.
> > Currently it creates many directories and files to
> > do the saving.

> > Microsoft's OLE's compound file works well, but
> > it's not on Linux.  Can you suggest a location/name?

 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by Richard Jone » Wed, 16 Dec 1998 04:00:00


: Hi,

: I'm looking for some sort of file-system-within-a-file
: type of library.  Some thing that lets me create directories
: and files (inside a file); modify, append, shrink, delete, add
: those files.  I don't really need permissions on the files/
: directories.

Perhaps a dbm file (see `man gdbm' on Linux for the GNU
version).

This will let you store, modify and remove (key,value)
pairs. While these are not as rich as the directory
structures you are talking about, they may be good
enough to fit your application. And dbm files are
fairly efficient too (I've used dbm files up to 1/2 GB
in size), which is probably not true for OLE.

Rich.

--
-      Richard Jones. Linux contractor London and SE areas.        -
-    Very boring homepage at: http://www.annexia.demon.co.uk/      -
- You are currently the 1,991,243,100th visitor to this signature. -
-    Original message content Copyright (C) 1998 Richard Jones.    -

 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by William McBri » Thu, 17 Dec 1998 04:00:00


: I'm looking for some sort of file-system-within-a-file type of library.  
: Some thing that lets me create directories and files (inside a file);

Not a library, but the loopback filesystem does exactly this. Some info is
available at:

 http://www.gedanken.demon.co.uk/linux/looproot.html

--
William McBrine    | http://www.clark.net/~wmcbrine/

 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by Paul Moo » Fri, 18 Dec 1998 04:00:00





>: I'm looking for some sort of file-system-within-a-file type of library.  
>: Some thing that lets me create directories and files (inside a file);

>Not a library, but the loopback filesystem does exactly this. Some info is
>available at:

> http://www.gedanken.demon.co.uk/linux/looproot.html

One point on this - a loopback filesystem is constructed in a file,
whose size is fixed at creation time (and which cannot be changed
short of reformatting). I think the original poster was more after
something that would grow and shrink as necessary to hold the data.
(MS Compound files grow, but don't shrink very well...)

Paul.

 
 
 

Help: Is there a structured storage library for Linux (like MS OLE's compound file)?

Post by Tim Smi » Sun, 20 Dec 1998 04:00:00



>I'm looking for some sort of file-system-within-a-file
>type of library.  Some thing that lets me create directories
>and files (inside a file); modify, append, shrink, delete, add
>those files.  I don't really need permissions on the files/
>directories.

Take a look at the db library.  For keys, just take the names that you would
use if you were using files (e.g., "dir1/dir2/dir3/filename").  The only
operation that you could do on real directories that doesn't map easily to
this approach is listing the contents of a directory.  If that is a
requirement, it would not be hard to maintain either a comprehensive
index for the whole database, or separate indexes for each logical
directory (e.g., "dir1/dir2/dir3/.index" would be the key to a record
that just lists all the keys that start with "dir1/dir2/dir3/" and have
exactly three slashes in their name).

--Tim Smith