@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 file or symbolic link in a repository's default
branch (usually master).
|
Content |
get(String path,
String ref)
Get the contents of a 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.
|
@NotNull(message="Content is never NULL") Content readme() throws IOException
IOException
- If an IO Exception occurs.@NotNull(message="Content is never NULL") Content readme(@NotNull(message="branch is never NULL") String branch) throws IOException
branch
- The branch nameIOException
- If an IO Exception occurs.@NotNull(message="Content is never NULL") Content create(@NotNull(message="content is never NULL") javax.json.JsonObject content) throws IOException
content
- Parameters to create new contentIOException
- If there is any I/O problem@NotNull(message="Content is never NULL") Content get(@NotNull(message="path is never NULL") String path, @NotNull(message="ref is never NULL") String ref) throws IOException
path
- The content pathref
- The name of the commit/branch/tag.IOException
- If there is any I/O problem@NotNull(message="Content is never NULL") Content get(@NotNull(message="path is never NULL") String path) throws IOException
path
- The content pathIOException
- If there is any I/O problem@NotNull(message="iterable is never NULL") Iterable<Content> iterate(@NotNull(message="path is never NULL") String path, @NotNull(message="ref is never NULL") 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 problem@NotNull(message="Content is never NULL") RepoCommit remove(@NotNull(message="content is never NULL") javax.json.JsonObject content) throws IOException
content
- Parameters to remove a fileIOException
- If there is any I/O problem@NotNull(message="RepoCommit is never NULL") RepoCommit update(@NotNull(message="path is never NULL") String path, @NotNull(message="json is never NULL") 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(@NotNull(message="path is never NULL") String path, @NotNull(message="ref is never NULL") String ref) throws IOException
path
- The content pathref
- The name of the commit/branch/tag.IOException
- If there is any I/O problemCopyright © 2012–2014 jcabi.com. All rights reserved.