lib/Github/Api/Repository/Contents.php
public function show($username, $repository, $path = null, $reference = null)
    {
        $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents';
        if (null !== $path) {
            $url .= '/'.rawurlencode($path);
        }

        return $this->get($url, [
            'ref' => $reference,
        ]);
    }
public function show($username, $repository, $path = null, $reference = null)
    {
        $url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents';
        if (null !== $path) {
            $url .= '/'.rawurlencode($path);
        }

        return $this->get($url, [
            'ref' => $reference,
        ]);
    }
public function show ( $ username , $ repository , $ path = null , $ reference = null ) { $ url = '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contents' ; if ( null !== $ path ) { $ url .= '/' . rawurlencode ( $ path ) ; } return $ this -> get ( $ url , [ 'ref' => $ reference , ] ) ; }
Get contents of any file or directory in a repository.

@link http://developer.github.com/v3/repos/contents/

@param string      $username   the user who owns the repository
@param string      $repository the name of the repository
@param null|string $path       path to file or directory
@param null|string $reference  reference to a branch or commit

@return array|string information for file | information for each item in directory
Get contents of any file or directory in a repository .