> * The File Manager would be XML/XSLT based, allowing users to 'walk the
> tree' AND because of the XSLT be completely skinable (I have no idea how
> gtk+ works, this could be another option). '/' would be the over seeing
> class with everything below it being a child (see below for a short, thin
> sample format)
>

Storing this type of information in a flat file is not a very good design for 
a few reasons:

1.  This information is all available from system calls, so why is somebody 
going to keep the information around in a file.

man 2 stat

2.  If someone does keep this information around in a file, it is going to be 
extremely huge!  I did a recursive ls from / to find out how big that would 
be.  I got tired of waiting and killed the process.  It wasn't even done and 
I had a 9 mb file.  This XML example takes up much more space for each entry 
than that simple ls -l line, so do the math.  Who wants a ~40 mb file kicking 
around on the system, outlining what was on the system.

3.  A file of this magnitude is going to be terribly inefficient to parse 
through.  Depending on how you do it there are issues as well.  If you keep 
track of everything you parsed already in memory, Oh My God would the file 
manager be a memory pig.  If you didn't and reused you memory and dimissed 
what you didn't find, you information being changed will be a very hard 
to write back (you don't know where you were).

For modifications either hold on to all information and write what needs to 
be written (which is munching all kinds of memory to keep this info around) 
or save on memory and re-write the file all of the time (very slow and 
inefficient).

This just seems like a bad bad idea.  I have done a great deal of work with 
parsing files, and XML, to be precise parsing system files based on an XML 
description.  This seems way more work than is necessary.


Just wait for "Olympus" to come out with what you want.

>
> <root>
>       <dir>
>               <name>bin</name>
>               <owner>root</owner>
>               <group>wheel</group>
>               <date>2001-04-21 03:32</date>
>               <permission>0755</permission>
>       </dir>
>       <dir>
>               <name>etc</name>
>               <owner>root</owner>
>               <group>wheel</group>
>               <date>2001-04-21 03:32</date>
>               <permission>0755</permission>
>               <dir>
>                       <name>X11</name>
>                       <owner>root</owner>
>                       <group>wheel</group>
>                       <date>2001-04-21 03:32</date>
>                       <permission>0755</permission>
>               </dir>
>               <file>
>                       <name>csh.login</name>
>                       <owner>root</owner>
>                       <group>wheel</group>
>                       <date>2001-04-21 03:32</date>
>                       <permission>0644</permission>
>               </file>
>       </dir>
>       <slink>
>               <name>home</name>
>               <owner>root</owner>
>               <group>wheel</group>
>               <date>2001-04-21 03:32</date>
>               <permission>0755</permission>
>               <path>/usr/home/</path>
>       </slink>
>       <exec>
>               <name>kernel</name>
>               <owner>root</owner>
>               <group>wheel</group>
>               <date>2001-04-21 03:32</date>
>               <permission>0555</permission>
>       </exec>
> </root>
>
> Well, its a start anyway.
>
> -Tig

Reply via email to