i am making a database. i basically am finished. now im making a program which links directories and categories. In this linker, i have to grab a directory tree and plug it into each config file for each directory. This is accomplished easily, but what is hard is the categories...
you see, there is a category name for each directory, and although i have a way of telling exactly what directory im in, i have no way of telling the full path of categories im in. Basically, i can tell what the current category for the current directory is, but i can't (correctly) get the FULL PATH of categories.
for instance, i know am in directory /webdbase/pc/sw and i know that it is category SoftWare but i dont know how to tell that i am in /Main/PC Stuff/SoftWare. I can record each succeeding category, but that only works if there's 1 directory in each directory (a straight line).
So i thought, maybe i could use a hash, but many of my directory names are the same so it wouldn't work right. so as i parse through different categories and directories, how can i keep them all in line?
To get the directories i made a subroutine that recursively searches for all dirs, then goes back and searches those dirs. it finds all dirs with "db_engine.conf" and puts them all into an array. then i just erase the "db_engine.conf" and i have the full directories.
if you dont get what im saying email me at psypete@phreaker.net and ill give you a copy of the linker so far if you need it.
Edit 2001-04-04 by tye
In reply to My kingdom for a substring by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |