Package org.eclipse.jgit.lfs
Class Lfs
java.lang.Object
org.eclipse.jgit.lfs.Lfs
Class which represents the lfs folder hierarchy inside a
.git
folder- Since:
- 4.6
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new temp file in the LFS directoryGet the object directory used by LFSGet the LFS root directoryGet the path to the temporary directory used by LFS.Get the media file which stores the original content
-
Field Details
-
root
-
objDir
-
tmpDir
-
-
Constructor Details
-
Lfs
Constructor for Lfs.- Parameters:
db
- the associated repo- Since:
- 4.11
-
-
Method Details
-
getLfsRoot
Get the LFS root directory- Returns:
- the path to the LFS directory
-
getLfsTmpDir
Get the path to the temporary directory used by LFS.- Returns:
- the path to the temporary directory used by LFS. Will be
<repo>/.git/lfs/tmp
-
getLfsObjDir
Get the object directory used by LFS- Returns:
- the path to the object directory used by LFS. Will be
<repo>/.git/lfs/objects
-
getMediaFile
Get the media file which stores the original content- Parameters:
id
- the id of the mediafile- Returns:
- the file which stores the original content. Its path will look
like
"<repo>/.git/lfs/objects/<firstTwoLettersOfID>/<remainingLettersOfID>"
-
createTmpFile
Create a new temp file in the LFS directory- Returns:
- a new temporary file in the LFS directory
- Throws:
IOException
- when the temp file could not be created
-