Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Represents a tree object.
Synopsis
- newtype Tree = Tree (ManagedPtr Tree)
- class (GObject o, IsDescendantOf Tree o) => IsTree o
- toTree :: (MonadIO m, IsTree o) => o -> m Tree
- noTree :: Maybe Tree
- treeGet :: (HasCallStack, MonadIO m, IsTree a) => a -> Word32 -> m (Maybe TreeEntry)
- treeGetByName :: (HasCallStack, MonadIO m, IsTree a) => a -> Text -> m (Maybe TreeEntry)
- treeGetByPath :: (HasCallStack, MonadIO m, IsTree a) => a -> Text -> m (Maybe TreeEntry)
- treeGetId :: (HasCallStack, MonadIO m, IsTree a) => a -> m (Maybe OId)
- treeSize :: (HasCallStack, MonadIO m, IsTree a) => a -> m Word32
- treeWalk :: (HasCallStack, MonadIO m, IsTree a) => a -> TreeWalkMode -> TreeWalkCallback -> m ()
Exported types
Memory-managed wrapper type.
Instances
GObject Tree Source # | |
Defined in GI.Ggit.Objects.Tree gobjectType :: IO GType # | |
HasParentTypes Tree Source # | |
Defined in GI.Ggit.Objects.Tree | |
type ParentTypes Tree Source # | |
Defined in GI.Ggit.Objects.Tree |
class (GObject o, IsDescendantOf Tree o) => IsTree o Source #
Instances
(GObject o, IsDescendantOf Tree o) => IsTree o Source # | |
Defined in GI.Ggit.Objects.Tree |
Methods
get
:: (HasCallStack, MonadIO m, IsTree a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe TreeEntry) |
Get a tree entry by index.
getByName
:: (HasCallStack, MonadIO m, IsTree a) | |
=> a |
|
-> Text |
|
-> m (Maybe TreeEntry) |
Get a tree entry by name.
getByPath
:: (HasCallStack, MonadIO m, IsTree a) | |
=> a |
|
-> Text |
|
-> m (Maybe TreeEntry) |
Retrieves a tree entry contained in a tree or in any of its subtrees, given its relative path.
getId
Get the OId
of the tree.
size
:: (HasCallStack, MonadIO m, IsTree a) | |
=> a |
|
-> m Word32 | Returns: the number of entries in the tree. |
Get the number of entries in the tree.
walk
:: (HasCallStack, MonadIO m, IsTree a) | |
=> a |
|
-> TreeWalkMode |
|
-> TreeWalkCallback |
|
-> m () | (Can throw |
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).