public function listContents($directory = '', $recursive = false)
    {
        try {
            return $this->addDirNames($this->doListContents($directory));
        } catch (\Exception $e) {
            return [];
        }
    }
public function listContents($directory = '', $recursive = false)
    {
        try {
            return $this->addDirNames($this->doListContents($directory));
        } catch (\Exception $e) {
            return [];
        }
    }
public function listContents ( $ directory = '' , $ recursive = false ) { try { return $ this -> addDirNames ( $ this -> doListContents ( $ directory ) ) ; } catch ( \ Exception $ e ) { return [ ] ; } }
List contents of a directory.
Cloudinary does not support non recursive directory scan
because they treat filename prefixes as folders.

Good news is Flysystem can handle this and will filter out subdirectory content
if $recursive is false.

@param string $directory
@param bool   $recursive

@return array
List contents of a directory . Cloudinary does not support non recursive directory scan because they treat filename prefixes as folders .