I have written a function which accepts DIR * as argument and lists files inside that (with readdir function)
In addition, I just want to be able to stat files returned by readdir. It is not clear where DIR * is pointing to, so is there a way to get full path of directory from DIR * or is there any other way that I can stat files with?