gi-ggit-1.0.14: libgit2-glib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Ggit.Objects.Tree

Description

Represents a tree object.

Synopsis

Exported types

newtype Tree Source #

Memory-managed wrapper type.

Constructors

Tree (ManagedPtr Tree) 

Instances

Instances details
Eq Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

Methods

(==) :: Tree -> Tree -> Bool #

(/=) :: Tree -> Tree -> Bool #

GObject Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

ManagedPtrNewtype Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

Methods

toManagedPtr :: Tree -> ManagedPtr Tree

TypedObject Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

Methods

glibType :: IO GType

HasParentTypes Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

IsGValue (Maybe Tree) Source #

Convert Tree to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Tree

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Tree -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Tree)

type ParentTypes Tree Source # 
Instance details

Defined in GI.Ggit.Objects.Tree

type ParentTypes Tree = '[Object, Native, ObjectFactoryBase, Object]

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

Instances details
(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.

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).