def getResourceFolderContents(self, pid, pathname):
url = "<STR_LIT>".format(url_base=self.url_base, pid=pid, path=pathname)<EOL>r = self._request('<STR_LIT:GET>', url)<EOL>if r.status_code != <NUM_LIT:200>:<EOL><INDENT>if r.status_code == <NUM_LIT>:<EOL><INDENT>raise HydroShareNotAuthorized(('<STR_LIT:GET>', url))<EOL><DEDENT>elif r.status_code == <NUM_LIT>:<EOL><INDENT>raise HydroShareNotFound((pid,))<EOL><DEDENT>else:<EOL><INDENT>raise HydroShareHTTPException((url, '<STR_LIT:GET>', r.status_code))<EOL><DEDENT><DEDENT>return r.json()<EOL>
Get a listing of files and folders for a resource at the specified path (*pathname*)

        :param pid: The HydroShare ID of the resource whose folder contents to be listed
        :param pathname: Folder path for which contents (files and folders) need to be listed
        :return: A JSON object representing the contents of the specified folder

        :raises: HydroShareNotAuthorized if user is not authorized to perform action.
        :raises: HydroShareNotFound if the resource or resource file was not found.
        :raises: HydroShareHTTPException if an unexpected HTTP response code is encountered.

        Example of JSON data returned:
        {
            "resource_id": "32a08bc23a86e471282a832143491b49",
            "path": "model/initial",
            "files": ["model.exe", "param.txt"],
            "folders": ["run/1", "run/2"]
        }