gi-ggit-1.0.7: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Objects.Tree

Contents

Description

Represents a tree object.

Synopsis

Exported types

newtype Tree Source #

Memory-managed wrapper type.

Constructors

Tree (ManagedPtr Tree) 
Instances
GObject Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

Methods

gobjectType :: IO GType #

HasParentTypes Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

type ParentTypes Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

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

class (GObject o, IsDescendantOf Tree o) => IsTree o Source #

Type class for types which can be safely cast to Tree, for instance with toTree.

Instances
(GObject o, IsDescendantOf Tree o) => IsTree o Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

toTree :: (MonadIO m, IsTree o) => o -> m Tree Source #

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

noTree :: Maybe Tree Source #

A convenience alias for Nothing :: Maybe Tree.

Methods

get

treeGet Source #

Arguments

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

tree: a Tree.

-> Word32

i: the index of the entry.

-> m (Maybe TreeEntry)

Returns: a TreeEntry or Nothing.

Get a tree entry by index.

getByName

treeGetByName Source #

Arguments

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

tree: a Tree.

-> Text

name: a filename.

-> m (Maybe TreeEntry)

Returns: a TreeEntry or Nothing.

Get a tree entry by name.

getByPath

treeGetByPath Source #

Arguments

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

tree: a Tree.

-> Text

path: a path.

-> m (Maybe TreeEntry)

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

Retrieves a tree entry contained in a tree or in any of its subtrees, given its relative path.

getId

treeGetId Source #

Arguments

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

tree: a Tree.

-> m (Maybe OId)

Returns: a OId or Nothing.

Get the OId of the tree.

size

treeSize Source #

Arguments

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

tree: a Tree.

-> m Word32

Returns: the number of entries in the tree.

Get the number of entries in the tree.

walk

treeWalk Source #

Arguments

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

tree: a Tree.

-> TreeWalkMode

mode: the walking order.

-> TreeWalkCallback

callback: the callback to call for each entry.

-> m ()

(Can throw GError)

Walk all the entries of a tree object recursively (resolving and walking subtrees of the tree as needed). The error will be set to the error returned by callback (if any).