public class GHContent extends Object
GHRepository.getFileContent(String)| Constructor and Description |
|---|
GHContent() |
public GHRepository getOwner()
public String getType()
public String getEncoding()
public long getSize()
public String getSha()
public String getName()
public String getPath()
public String getContent() throws IOException
read()Due to the nature of GitHub's API, you're not guaranteed that the content will already be populated, so this may trigger network activity, and can throw an IOException.
IOExceptionpublic String getEncodedContent() throws IOException
read()Due to the nature of GitHub's API, you're not guaranteed that the content will already be populated, so this may trigger network activity, and can throw an IOException.
IOExceptionpublic String getUrl()
public String getGitUrl()
public String getHtmlUrl()
public InputStream read() throws IOException
IOExceptionpublic String getDownloadUrl() throws IOException
IOExceptionpublic boolean isFile()
public boolean isDirectory()
protected void populate()
throws IOException
IOExceptionpublic PagedIterable<GHContent> listDirectoryContent() throws IOException
IOExceptionpublic GHContentUpdateResponse update(String newContent, String commitMessage) throws IOException
IOExceptionpublic GHContentUpdateResponse update(String newContent, String commitMessage, String branch) throws IOException
IOExceptionpublic GHContentUpdateResponse update(byte[] newContentBytes, String commitMessage) throws IOException
IOExceptionpublic GHContentUpdateResponse update(byte[] newContentBytes, String commitMessage, String branch) throws IOException
IOExceptionpublic GHContentUpdateResponse delete(String message) throws IOException
IOExceptionpublic GHContentUpdateResponse delete(String commitMessage, String branch) throws IOException
IOExceptionpublic static GHContent[] wrap(GHContent[] contents, GHRepository repository)
Copyright © 2017. All rights reserved.