As you should have figured out by now, that no body does your work for you, the people here are very helpful, but, you need to do everything yourself, then if something is really wrong, and they feel you are showing some efforts also, then they will help you, as much as they can!
Start from, how to read a directory (as opposed to an ordinary file), should not be too difficult, just start ... at least