Mapping a directory into a database table

Guys I am trying to display a series of directories located on the server in a tree view. I have seen some solutions for displaying a tree view based on data on a database but I need to first map my directory into the database. How can I do this? Also, I want to take the opportunity to ask if what component to use to display the tree? (YUI treeview component?)