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 an entry in a tree.
Synopsis
- newtype TreeEntry = TreeEntry (ManagedPtr TreeEntry)
- noTreeEntry :: Maybe TreeEntry
- treeEntryGetFileMode :: (HasCallStack, MonadIO m) => TreeEntry -> m FileMode
- treeEntryGetId :: (HasCallStack, MonadIO m) => TreeEntry -> m (Maybe OId)
- treeEntryGetName :: (HasCallStack, MonadIO m) => TreeEntry -> m (Maybe Text)
- treeEntryGetObjectType :: (HasCallStack, MonadIO m) => TreeEntry -> m GType
- treeEntryRef :: (HasCallStack, MonadIO m) => TreeEntry -> m (Maybe TreeEntry)
- treeEntryUnref :: (HasCallStack, MonadIO m) => TreeEntry -> m ()
Exported types
Memory-managed wrapper type.
Instances
BoxedObject TreeEntry Source # | |
Methods
getFileMode
:: (HasCallStack, MonadIO m) | |
=> TreeEntry |
|
-> m FileMode | Returns: the |
Gets the FileMode
of a tree entry.
getId
Get the OId
of the entry.
getName
:: (HasCallStack, MonadIO m) | |
=> TreeEntry |
|
-> m (Maybe Text) | Returns: the name of the tree entry or |
Get the name of the tree entry.
getObjectType
treeEntryGetObjectType Source #
Get the type of the tree entry object.
ref
Atomically increments the reference count of entry
by one.
This function is MT-safe and may be called from any thread.
unref
:: (HasCallStack, MonadIO m) | |
=> TreeEntry |
|
-> m () |
Atomically decrements the reference count of entry
by one.
If the reference count drops to 0, entry
is freed.