@Immutable
public interface Contents
Modifier and Type | Method and Description |
---|---|
Content |
create(javax.json.JsonObject content)
Create new file.
|
boolean |
exists(String path,
String ref)
Check whether content exists or not.
|
Content |
get(String path)
Get the contents of a single file or symbolic link.
|
Content |
get(String path,
String ref)
Get the contents of a single file or symbolic link in a repository.
|
Iterable<Content> |
iterate(String path,
String ref)
Get the contents of a directory in a repository.
|
Content |
readme()
Get the Readme file of the default branch (usually master).
|
Content |
readme(String branch)
Get the Readme file of the specified branch.
|
RepoCommit |
remove(javax.json.JsonObject content)
Removes a file.
|
Repo |
repo()
Owner of them.
|
RepoCommit |
update(String path,
javax.json.JsonObject json)
Updates a file.
|
Repo repo()
Content readme() throws IOException
IOException
- If an IO Exception occurs.Content readme(String branch) throws IOException
branch
- The branch nameIOException
- If an IO Exception occurs.Content create(javax.json.JsonObject content) throws IOException
content
- Parameters to create new contentIOException
- If there is any I/O problemContent get(String path, String ref) throws IOException
path
- The content pathref
- The name of the commit/branch/tag.IOException
- If there is any I/O problemContent get(String path) throws IOException
path
- The content pathIOException
- If there is any I/O problemIterable<Content> iterate(String path, String ref) throws IOException
path
- The content pathref
- The name of the commit/branch/tag. Default: the repository's default branch (usually master)IOException
- If there is any I/O problemRepoCommit remove(javax.json.JsonObject content) throws IOException
content
- Parameters to remove a fileIOException
- If there is any I/O problemRepoCommit update(String path, javax.json.JsonObject json) throws IOException
path
- The content path.json
- JSON object containing updates to the content.IOException
- If any I/O problems occur.boolean exists(String path, String ref) throws IOException
path
- The content pathref
- The name of the commit/branch/tag.IOException
- If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.