java.lang.Object
java.io.File
org.eclipse.jgit.internal.storage.file.PackFile
- All Implemented Interfaces:
Serializable
,Comparable<File>
A pack file (or pack related) File.
Example: "pack-0123456789012345678901234567890123456789.idx"
- See Also:
-
Field Summary
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a PackFile for a pack or related file.Create a PackFile for a pack or related file.Create a PackFile for a pack or related file.Create a PackFile for a pack or related file. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new similar PackFile with the given extension instead.createForDirectory
(File directory) Create a new similar PackFile in the given directory.createPreservedForDirectory
(File directory) Create a new similar preserved PackFile in the given directory.getId()
Getter for the fieldid
.Getter for the fieldpackExt
.Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
-
Constructor Details
-
PackFile
Create a PackFile for a pack or related file.- Parameters:
file
- File pointing to the location of the file.
-
PackFile
Create a PackFile for a pack or related file.- Parameters:
directory
- Directory to create the PackFile in.id
- theObjectId
for this packext
- thepackExt
of the name.
-
PackFile
Create a PackFile for a pack or related file.- Parameters:
directory
- Directory to create the PackFile in.id
- theid
(40 Hex char) section of the pack name.ext
- thepackExt
of the name.
-
PackFile
Create a PackFile for a pack or related file.- Parameters:
directory
- Directory to create the PackFile in.name
- Filename (last path section) of the PackFile
-
-
Method Details
-
getId
Getter for the fieldid
.- Returns:
- the
id
(40 Hex char) section of the name.
-
getPackExt
Getter for the fieldpackExt
.- Returns:
- the
packExt
of the name.
-
create
Create a new similar PackFile with the given extension instead.- Parameters:
ext
- PackExt the extension to use.- Returns:
- a PackFile instance with specified extension
-
createForDirectory
Create a new similar PackFile in the given directory.- Parameters:
directory
- Directory to create the new PackFile in.- Returns:
- a PackFile in the given directory
-
createPreservedForDirectory
Create a new similar preserved PackFile in the given directory.- Parameters:
directory
- Directory to create the new PackFile in.- Returns:
- a PackFile in the given directory with "old-" prefixing the extension
-