public function getDirectoryList($path = null, $showHidden = true)
    {
        $uri = 'directory.list';
        $uriData = [];

        if ($path) {
            $uriData['path'] = $path;
        }
        if ($showHidden) {
            $uriData['show_hidden'] = true;
        }

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'get',
                    'data' => $uriData
                ]
            );
        } catch (\Exception $e) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
public function getDirectoryList($path = null, $showHidden = true)
    {
        $uri = 'directory.list';
        $uriData = [];

        if ($path) {
            $uriData['path'] = $path;
        }
        if ($showHidden) {
            $uriData['show_hidden'] = true;
        }

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'get',
                    'data' => $uriData
                ]
            );
        } catch (\Exception $e) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
public function getDirectoryList ( $ path = null , $ showHidden = true ) { $ uri = 'directory.list' ; $ uriData = [ ] ; if ( $ path ) { $ uriData [ 'path' ] = $ path ; } if ( $ showHidden ) { $ uriData [ 'show_hidden' ] = true ; } try { $ response = $ this -> _request ( [ 'uri' => $ uri , 'type' => 'get' , 'data' => $ uriData ] ) ; } catch ( \ Exception $ e ) { throw new InvalidException ( $ e -> getMessage ( ) ) ; } return $ response -> getBody ( ) -> getContents ( ) ; }
Return the directory list of a given directory

@param null $path
@param bool|true $showHidden
@return string
@throws InvalidException
Return the directory list of a given directory