public class Lfs
extends java.lang.Object
.git
folderModifier and Type | Field and Description |
---|---|
private java.nio.file.Path |
objDir |
private java.nio.file.Path |
root |
private java.nio.file.Path |
tmpDir |
Constructor and Description |
---|
Lfs(Repository db)
Constructor for Lfs.
|
Modifier and Type | Method and Description |
---|---|
java.nio.file.Path |
createTmpFile()
Create a new temp file in the LFS directory
|
java.nio.file.Path |
getLfsObjDir()
Get the object directory used by LFS
|
java.nio.file.Path |
getLfsRoot()
Get the LFS root directory
|
java.nio.file.Path |
getLfsTmpDir()
Get the path to the temporary directory used by LFS.
|
java.nio.file.Path |
getMediaFile(AnyLongObjectId id)
Get the media file which stores the original content
|
private java.nio.file.Path root
private java.nio.file.Path objDir
private java.nio.file.Path tmpDir
public Lfs(Repository db)
db
- the associated repopublic java.nio.file.Path getLfsRoot()
public java.nio.file.Path getLfsTmpDir()
<repo>/.git/lfs/tmp
public java.nio.file.Path getLfsObjDir()
<repo>/.git/lfs/objects
public java.nio.file.Path getMediaFile(AnyLongObjectId id)
id
- the id of the mediafile"<repo>/.git/lfs/objects/<firstTwoLettersOfID>/<remainingLettersOfID>"
public java.nio.file.Path createTmpFile() throws java.io.IOException
java.io.IOException
- when the temp file could not be created