def get_dir_contents(self, path, ref=github.GithubObject.NotSet):
assert isinstance(path, (str, unicode)), path<EOL>assert ref is github.GithubObject.NotSet or isinstance(ref, (str, unicode)), ref<EOL>url_parameters = dict()<EOL>if ref is not github.GithubObject.NotSet:<EOL><INDENT>url_parameters["<STR_LIT>"] = ref<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:GET>",<EOL>self.url + "<STR_LIT>" + urllib.quote(path),<EOL>parameters=url_parameters<EOL>)<EOL>if headers.get('<STR_LIT:status>') == '<STR_LIT>' and headers.get('<STR_LIT:location>'):<EOL><INDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:GET>",<EOL>headers['<STR_LIT:location>'],<EOL>parameters=url_parameters<EOL>)<EOL><DEDENT>return [<EOL>github.ContentFile.ContentFile(self._requester, headers, attributes, completed=(attributes["<STR_LIT:type>"] != "<STR_LIT:file>"))  <EOL>for attributes in data<EOL>]<EOL>
:calls: `GET /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents>`_
:param path: string
:param ref: string
:rtype: list of :class:`github.ContentFile.ContentFile`