Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Issue with using API 'listfiles'

Discussion in 'cPanel Developers' started by karan1, Feb 17, 2016.

  1. karan1

    karan1 Registered

    Joined:
    Feb 17, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice