

Ask HN: What data structure/db should I use for storing the file tree structure? - code_devil

I am trying to write an application(I am using python) to have a copy of a remote machines directory structure in my local machine (not the actual content of the files in the remote machine).<p>Once I store it in my local machine, I want to be be able to perform the following operations on my local copy of the tree structure<p>"ls"<p>"ls /etc"<p>"ls /etc/bin/yahoo"<p>and see the listing. Also if I change/add a dir/file name in the remote machine, I want to have the ability to easily update it in my local data structure.
======
YuriNiyazov
You don't specify any performance requirements, so take a look at this:

<http://en.wikipedia.org/wiki/Nested_set_model>

You will be able to update, but it will not be efficient.

Also - questions of this type are more appropriate for StackOverflow than
HackerNews.

