I am trying to emulate ls -l command using c, that lists all the files in a directory. I don't want to use system call. What I am looking for is a way to do it using <dirent.h> header. May be start with a struct or something. Any ideas or solutions will be appreciated.