Class FileLfsRepository
java.lang.Object
org.eclipse.jgit.lfs.server.fs.FileLfsRepository
- All Implemented Interfaces:
LargeFileRepository
Repository storing large objects in the file system
- Since:
- 4.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDir()Get the storage directoryGet download actionprotected PathGet the path where the given object is storedlongGet size of an objectgetUploadAction(AnyLongObjectId id, long size) Get upload actiongetUrl()Get verify actionvoid
-
Constructor Details
-
FileLfsRepository
Constructor for FileLfsRepository.
- Parameters:
url- external URL of this repositorydir- storage directory- Throws:
IOException
-
-
Method Details
-
getDownloadAction
Get download action- Specified by:
getDownloadActionin interfaceLargeFileRepository- Parameters:
id- id of the object to download- Returns:
- Action for downloading the object
-
getUploadAction
Get upload action- Specified by:
getUploadActionin interfaceLargeFileRepository- Parameters:
id- id of the object to uploadsize- size of the object to be uploaded- Returns:
- Action for uploading the object
-
getVerifyAction
Get verify action- Specified by:
getVerifyActionin interfaceLargeFileRepository- Parameters:
id- id of the object to be verified- Returns:
- Action for verifying the object, or
nullif the server doesn't support or require verification
-
getSize
Get size of an object- Specified by:
getSizein interfaceLargeFileRepository- Parameters:
id- id of the object- Returns:
- length of the object content in bytes, -1 if the object doesn't exist
- Throws:
IOException
-
getDir
-
getPath
Get the path where the given object is stored- Parameters:
id- id of a large object- Returns:
- path the object's storage path
-
getUrl
- Returns:
- the url of the content server
- Since:
- 4.11
-
setUrl
- Parameters:
url- the url of the content server- Since:
- 4.11
-