public class FileLfsRepository extends Object implements LargeFileRepository
| Constructor and Description |
|---|
FileLfsRepository(String url,
Path dir)
Constructor for FileLfsRepository.
|
| Modifier and Type | Method and Description |
|---|---|
Path |
getDir()
Get the storage directory
|
Response.Action |
getDownloadAction(AnyLongObjectId id)
Get download action
|
protected Path |
getPath(AnyLongObjectId id)
Get the path where the given object is stored
|
long |
getSize(AnyLongObjectId id)
Get size of an object
|
Response.Action |
getUploadAction(AnyLongObjectId id,
long size)
Get upload action
|
String |
getUrl() |
Response.Action |
getVerifyAction(AnyLongObjectId id)
Get verify action
|
void |
setUrl(String url) |
public FileLfsRepository(String url, Path dir) throws IOException
Constructor for FileLfsRepository.
url - external URL of this repositorydir - storage directoryIOExceptionpublic Response.Action getDownloadAction(AnyLongObjectId id)
getDownloadAction in interface LargeFileRepositoryid - id of the object to downloadpublic Response.Action getUploadAction(AnyLongObjectId id, long size)
getUploadAction in interface LargeFileRepositoryid - id of the object to uploadsize - size of the object to be uploaded@Nullable public Response.Action getVerifyAction(AnyLongObjectId id)
getVerifyAction in interface LargeFileRepositoryid - id of the object to be verifiednull if the server
doesn't support or require verificationpublic long getSize(AnyLongObjectId id) throws IOException
getSize in interface LargeFileRepositoryid - id of the objectIOExceptionpublic Path getDir()
protected Path getPath(AnyLongObjectId id)
id - id of a large objectpublic String getUrl()
public void setUrl(String url)
url - the url of the content serverCopyright © 2019 Eclipse JGit Project. All rights reserved.