Class ObjectDatabaseBackend
An object database backend, responsible for actually reading and writing objects into a storage location.
Inheritance
Namespace: Dogged
Assembly: Dogged.dll
Syntax
public class ObjectDatabaseBackend : object
Methods
| Improve this Doc View SourceCreateLooseBackend(String, CompressionLevel, Boolean, FileMode, FileMode)
An object database backend for "loose" objects, stored on disk compressed into a single file per object. The directory is stored in standard git loose object format, with a "fanout" of subdirectories named with the first two characters of the object's ID and the object stored in a file beneath that, named with the remaining 38 characters of the ID.
This object database backend is read/write.
Declaration
public static ObjectDatabaseBackend CreateLooseBackend(string path, CompressionLevel compressionLevel = default(CompressionLevel), bool fsync = false, FileMode directoryMode = default(FileMode), FileMode fileMode = default(FileMode))
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | The path to the object directory |
| CompressionLevel | compressionLevel | The zlib compression level. 0-9 with 0 being no compression, and 9 being maximum compression. |
| System.Boolean | fsync | If true, fsync will be called after each write |
| FileMode | directoryMode | The POSIX mode to create directories with, or 0 for defaults. |
| FileMode | fileMode | The POSIX mode to create files with, or 0 for defaults. |
Returns
| Type | Description |
|---|---|
| ObjectDatabaseBackend |
CreatePackBackend(String)
An object database backend for a directory of packfiles stored on disk. The directory is stored in typical git object format, containing a "pack" directory that will be consulted to find the packfiles to load. Each packfile within that "pack" directory will be consulted as storage for the object database.
This object database backend is read-only.
Declaration
public static ObjectDatabaseBackend CreatePackBackend(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | The path to the directory containing packfiles |
Returns
| Type | Description |
|---|---|
| ObjectDatabaseBackend |
CreatePackfileBackend(String)
An object database backend for a single packfile stored on disk. Only the given packfile will be consulted as storage for the object database.
This object database backend is read-only.
Declaration
public static ObjectDatabaseBackend CreatePackfileBackend(string indexFilename)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | indexFilename |
Returns
| Type | Description |
|---|---|
| ObjectDatabaseBackend |