Hi,
I need to clarify something in my mind about typed files and their
content.
I understand that a typed file can contain an (unlimited?) number of
records with a single given structure. But since records are just a
way of interpreting a sequence of bytes, isn't it possible to have
some other data in the same file, e.g. in front of all the records?
What I'd like to achieve is having 2 or more sections in a single
file: a first section with some "name=value" information (INI like),
and another section consisting of my array of records. And why not,
some more sections with records of different type each...
For my project, I am trying to keep all the data in a single file --
IMO splitting data across several files like DBase tables, is a bad
thing to do. In general, single data-file improves the security,
safety, ****tability (USB), simplicity/elegance in programming, and
also demands less ressources.
A possible solution (I have yet to figure out the coding) would be
manipulating the Seek function's output. Or maybe to split the file's
content into 2 streams, one for each section? Or maybe "stitching"
several memory streams together before saving them to disk?
If anyone has an opinion, experience or hopefully some sample code for
that, it will be much appreciated !


|