phpdropboxdropbox-apidropbox-php

Dropbox - How to list files inside directory


Any idea on how to list all the files inside a directoy in Dropbox via the PHP api?

Partially the function: searchFileNames does what I need with the following code:

$dbxClient = new dbx\Client("<access_token>", "PHP-Example/1.0");
$result = $dbxClient->searchFileNames($path_dir, "<some_common_text>");

but this function doesn't offer any wildcard on the second parameter where I could specify: "*" in order to list all the files.

Any ideas?


Solution

  • The solution was:

    $dbxClient->getMetadataWithChildren($path_dir)