C# Class GitSharp.Core.ObjectDirectory

Traditional file system based ObjectDatabase. This is the classical object database representation for a Git repository, where objects are stored loose by hashing them into directories by their ObjectId, or are stored in compressed containers known as PackFiles.
Inheritance: ObjectDatabase
ファイルを表示 Open project: stschake/GitSharp Class Usage Examples

Public Methods

Method Description
ObjectDirectory ( DirectoryInfo dir, DirectoryInfo alternateObjectDir ) : System

Initialize a reference to an on-disk object directory.

OpenObjectInAllPacksImplementation ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void
ToString ( ) : string
closeSelf ( ) : void
create ( ) : void
exists ( ) : bool
fileFor ( AnyObjectId objectId ) : FileInfo

Compute the location of a loose object file.

getDirectory ( ) : DirectoryInfo

Gets the location of the objects directory.

hasObject1 ( AnyObjectId objectId ) : bool
hasObject2 ( string objectName ) : bool
openObject1 ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
openObject2 ( GitSharp.Core.WindowCursor curs, string objectName, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
openPack ( FileInfo pack, FileInfo idx ) : void

Add a single existing pack to the list of available pack files.

tryAgain1 ( ) : bool

Protected Methods

Method Description
loadAlternates ( ) : GitSharp.Core.ObjectDatabase[]

Private Methods

Method Description
InsertPack ( PackFile pf ) : void
Open ( FileSystemInfo f ) : StreamReader
RemovePack ( PackFile deadPack ) : void
ReuseMap ( PackList old ) : PackFile>.Dictionary
ScanPacks ( PackList original ) : PackList
ScanPacksImpl ( PackList old ) : PackList
fileFor ( string objectName ) : FileInfo
indexOf ( PackFile list, PackFile pack ) : int
listPackDirectory ( ) : HashSet
openAlternate ( DirectoryInfo objdir ) : ObjectDatabase
openAlternate ( string location ) : ObjectDatabase

Method Details

ObjectDirectory() public method

Initialize a reference to an on-disk object directory.
public ObjectDirectory ( DirectoryInfo dir, DirectoryInfo alternateObjectDir ) : System
dir System.IO.DirectoryInfo the location of the objects directory.
alternateObjectDir System.IO.DirectoryInfo a list of alternate object directories
return System

OpenObjectInAllPacksImplementation() public method

public OpenObjectInAllPacksImplementation ( ICollection @out, GitSharp.Core.WindowCursor windowCursor, AnyObjectId objectId ) : void
@out ICollection
windowCursor GitSharp.Core.WindowCursor
objectId AnyObjectId
return void

ToString() public method

public ToString ( ) : string
return string

closeSelf() public method

public closeSelf ( ) : void
return void

create() public method

public create ( ) : void
return void

exists() public method

public exists ( ) : bool
return bool

fileFor() public method

Compute the location of a loose object file.
public fileFor ( AnyObjectId objectId ) : FileInfo
objectId AnyObjectId Identity of the loose object to map to the directory.
return System.IO.FileInfo

getDirectory() public method

Gets the location of the objects directory.
public getDirectory ( ) : DirectoryInfo
return System.IO.DirectoryInfo

hasObject1() public method

public hasObject1 ( AnyObjectId objectId ) : bool
objectId AnyObjectId
return bool

hasObject2() public method

public hasObject2 ( string objectName ) : bool
objectName string
return bool

loadAlternates() protected method

protected loadAlternates ( ) : GitSharp.Core.ObjectDatabase[]
return GitSharp.Core.ObjectDatabase[]

openObject1() public method

public openObject1 ( GitSharp.Core.WindowCursor curs, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor
objectId AnyObjectId
return GitSharp.Core.ObjectLoader

openObject2() public method

public openObject2 ( GitSharp.Core.WindowCursor curs, string objectName, AnyObjectId objectId ) : GitSharp.Core.ObjectLoader
curs GitSharp.Core.WindowCursor
objectName string
objectId AnyObjectId
return GitSharp.Core.ObjectLoader

openPack() public method

Add a single existing pack to the list of available pack files.
/// Index file could not be opened, read, or is not recognized as /// a Git pack file index. ///
public openPack ( FileInfo pack, FileInfo idx ) : void
pack System.IO.FileInfo Path of the pack file to open.
idx System.IO.FileInfo Path of the corresponding index file.
return void

tryAgain1() public method

public tryAgain1 ( ) : bool
return bool