How i can give opendir it will read only the respected directory location.Here i want to read all folders and sub folders
Sometimes there isn't a way to do everything at once and you have to write code to perform the logic.
Of course, as 1nickt pointed out, there are modules out there which have already coded the logic, so you can do it all at once.
If you are constrained (for real or even if only in your imagination) from using a module, you'll need to write the code, and use of opendiris prescribed. (Hint: You'll have to do a loop, and recursion is usually employed as well.)
|