Skip to main content

API2 and delete files

Comments

4 comments

  • antonbiz
    I think I answered my question again. The API2 code seems to be
    return $xmlapi->api2_query($account, 'Fileman', 'fileop', $args2);
    Once I added the account it started deleting old files. I think someone should update the API docs.
    0
  • cPanelMichael
    Hello :) I am happy to see you were able to address the issue. Could you let us know which specific document is not providing the correct information? Thank you.
    0
  • antonbiz
    Hi. So I am basically following this doc. cPanel API 2 Functions - Fileman::fileop - Software Development Kit - cPanel Documentation Maybe I misread it or I am not using the function the same way. But nowhere does it say you need to specify the account before Fileman.
    0
  • cPanelMichael
    Please keep in mind that cPanel API 2 is deprecated. You may want to consider switching to UAPI: UAPI Functions - Fileman::list_files - Software Development Kit - cPanel Documentation Some functionality may not yet exist, but you could likely develop code that manually handles certain file operations (e.g. generate a list of files to delete or unlink and handle it through a cron job). Thank you.
    0

Please sign in to leave a comment.