[fpc-pascal]directory tree in memory
Ivan Montes
Drslump at btopenworld.com
Mon Oct 15 02:29:59 CEST 2001
Hi,
Maybe it's a bit off-topic, sorry for any incovenience.
In my library I need to have a repressentation of a directorty tree in memory, to search for files etc.
I'm using a tList like this :
pMyDirsItem = ^mydirsitem;
myDirsItem =RECORD
info :tFileInfo; //name, size, time/date ...
sub :tList;
end;
myDirs :tList;
What I do is store the file/directory name and the like in DirsItem.info and if it's a directory "sub" points to another tList with the contents of that directory.
It works but I would like to know if someone have a better solution for this problem. I'm not very happy with the performance when I have to find a file in it.
thanks, Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20011015/1009ddcc/attachment.html>
More information about the fpc-pascal
mailing list