gi-ggit-1.0.8: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.TreeBuilder

Contents

Description

Represents a tree object.

Synopsis

Exported types

newtype TreeBuilder Source #

Memory-managed wrapper type.

Constructors

TreeBuilder (ManagedPtr TreeBuilder) 
Instances
Eq TreeBuilder Source # 
Instance details

Defined in GI.Ggit.Objects.TreeBuilder

Methods

(==) :: TreeBuilder -> TreeBuilder -> Bool

(/=) :: TreeBuilder -> TreeBuilder -> Bool

GObject TreeBuilder Source # 
Instance details

Defined in GI.Ggit.Objects.TreeBuilder

Methods

gobjectType :: IO GType

IsGValue TreeBuilder Source #

Convert TreeBuilder to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.TreeBuilder

Methods

toGValue :: TreeBuilder -> IO GValue

fromGValue :: GValue -> IO TreeBuilder

HasParentTypes TreeBuilder Source # 
Instance details

Defined in GI.Ggit.Objects.TreeBuilder

type ParentTypes TreeBuilder Source # 
Instance details

Defined in GI.Ggit.Objects.TreeBuilder

type ParentTypes TreeBuilder = Native ': (ObjectFactoryBase ': (Object ': ([] :: [Type])))

class (GObject o, IsDescendantOf TreeBuilder o) => IsTreeBuilder o Source #

Type class for types which can be safely cast to TreeBuilder, for instance with toTreeBuilder.

Instances
(GObject o, IsDescendantOf TreeBuilder o) => IsTreeBuilder o Source # 
Instance details

Defined in GI.Ggit.Objects.TreeBuilder

toTreeBuilder :: (MonadIO m, IsTreeBuilder o) => o -> m TreeBuilder Source #

Cast to TreeBuilder, for types for which this is known to be safe. For general casts, use castTo.

noTreeBuilder :: Maybe TreeBuilder Source #

A convenience alias for Nothing :: Maybe TreeBuilder.

Methods

Overloaded methods

clear

treeBuilderClear Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a tTreeBuilder.

-> m () 

Clear all entries in the tree builder.

getEntry

treeBuilderGetEntry Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a tTreeBuilder.

-> Text

path: the path to remove.

-> m (Maybe TreeEntry)

Returns: the GGitTreeEntry or Nothing if no such entry exists.

Get an entry by path.

insert

treeBuilderInsert Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a tTreeBuilder.

-> Text

filename: the file name.

-> OId

oid: the tOId of the file blob to insert.

-> FileMode

fileMode: a tFileMode.

-> m (Maybe TreeEntry)

Returns: a tTreeEntry or Nothing. (Can throw GError)

Insert a file with a given blob in the tree builder. If the tree builder already contains an entry for the given file, then this entry will be overwritten.

Note that the returned tTreeEntry is bound to the lifetime of the tree builder and cannot be used after the tree builder has been freed.

remove

treeBuilderRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a tTreeBuilder.

-> Text

path: the path to remove.

-> m ()

(Can throw GError)

Remove an entry from the builder by path.

write

treeBuilderWrite Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeBuilder a) 
=> a

builder: a tTreeBuilder.

-> m (Maybe OId)

Returns: the tOId of the created tree object or Nothing. (Can throw GError)

Write the contents of the tree builder as a tree object.