Package org.eclipse.jgit.lfs.server.fs
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
formatHexChar
(char[] dst, int p, int b) private Response.Action
getDir()
Get the storage directoryGet download action(package private) AtomicObjectOutputStream
protected Path
Get the path where the given object is stored(package private) ReadableByteChannel
long
Get size of an objectgetUploadAction
(AnyLongObjectId id, long size) Get upload actiongetUrl()
Get verify actionvoid
private static char[]
toHexCharArray
(int b)
-
Field Details
-
url
-
dir
-
hexchar
private static final char[] hexchar
-
-
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:
getDownloadAction
in interfaceLargeFileRepository
- Parameters:
id
- id of the object to download- Returns:
- Action for downloading the object
-
getUploadAction
Get upload action- Specified by:
getUploadAction
in 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:
getVerifyAction
in interfaceLargeFileRepository
- Parameters:
id
- id of the object to be verified- Returns:
- Action for verifying the object, or
null
if the server doesn't support or require verification
-
getSize
Get size of an object- Specified by:
getSize
in 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
Get the storage directory- Returns:
- the path of the storage directory
-
getPath
Get the path where the given object is stored- Parameters:
id
- id of a large object- Returns:
- path the object's storage path
-
getAction
-
getReadChannel
- Throws:
IOException
-
getOutputStream
- Throws:
IOException
-
toHexCharArray
private static char[] toHexCharArray(int b) -
formatHexChar
private static void formatHexChar(char[] dst, int p, int b) -
getUrl
- Returns:
- the url of the content server
- Since:
- 4.11
-
setUrl
- Parameters:
url
- the url of the content server- Since:
- 4.11
-