Issue with using API 'listfiles'

karan1

Registered
Feb 17, 2016
1
0
1
India
cPanel Access Level
Website Owner
Hello,

I'm trying to extract the list of all files within public_html. When I use the API 'listfiles', it gives me the list of files and directories in the root folder. However, I need the list of files within folders >> sub-folders >> sub-sub-folders, etc.

I have written a recursive function which extracts files whenever the API results a directory. However, this function is taking a long time and I'm ending up getting a time-out error.

Hope someone on this forum can help me out here.

Thanks,
Karan