Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Private instance structure.
Synopsis
- newtype MutableTree = MutableTree (ManagedPtr MutableTree)
- class (GObject o, IsDescendantOf MutableTree o) => IsMutableTree o
- toMutableTree :: (MonadIO m, IsMutableTree o) => o -> m MutableTree
- mutableTreeCheckError :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m ()
- mutableTreeEnsureDir :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m MutableTree
- mutableTreeEnsureParentDirs :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> [Text] -> Text -> m MutableTree
- mutableTreeFillEmptyFromDirtree :: (HasCallStack, MonadIO m, IsMutableTree a, IsRepo b) => a -> b -> Text -> Text -> m Bool
- mutableTreeGetContentsChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m Text
- mutableTreeGetFiles :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m (Map Text Text)
- mutableTreeGetMetadataChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m Text
- mutableTreeLookup :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m (Maybe Text, Maybe MutableTree)
- mutableTreeNew :: (HasCallStack, MonadIO m) => m MutableTree
- mutableTreeNewFromChecksum :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> Text -> m MutableTree
- mutableTreeNewFromCommit :: (HasCallStack, MonadIO m, IsRepo a) => a -> Text -> m MutableTree
- mutableTreeRemove :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> Bool -> m ()
- mutableTreeReplaceFile :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> Text -> m ()
- mutableTreeSetContentsChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m ()
- mutableTreeSetMetadataChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m ()
- mutableTreeWalk :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> [Text] -> Word32 -> m MutableTree
Exported types
newtype MutableTree Source #
Memory-managed wrapper type.
MutableTree (ManagedPtr MutableTree) |
Instances
Eq MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree (==) :: MutableTree -> MutableTree -> Bool # (/=) :: MutableTree -> MutableTree -> Bool # | |
GObject MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree | |
ManagedPtrNewtype MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree toManagedPtr :: MutableTree -> ManagedPtr MutableTree | |
TypedObject MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree | |
HasParentTypes MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree | |
IsGValue (Maybe MutableTree) Source # | Convert |
Defined in GI.OSTree.Objects.MutableTree gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe MutableTree -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe MutableTree) | |
type ParentTypes MutableTree Source # | |
Defined in GI.OSTree.Objects.MutableTree type ParentTypes MutableTree = '[Object] |
class (GObject o, IsDescendantOf MutableTree o) => IsMutableTree o Source #
Type class for types which can be safely cast to MutableTree
, for instance with toMutableTree
.
Instances
(GObject o, IsDescendantOf MutableTree o) => IsMutableTree o Source # | |
Defined in GI.OSTree.Objects.MutableTree |
toMutableTree :: (MonadIO m, IsMutableTree o) => o -> m MutableTree Source #
Cast to MutableTree
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, checkError, ensureDir, ensureParentDirs, fillEmptyFromDirtree, forceFloating, freezeNotify, getv, isFloating, lookup, notify, notifyByPspec, ref, refSink, remove, replaceFile, runDispose, stealData, stealQdata, thawNotify, unref, walk, watchClosure.
Getters
getContentsChecksum, getData, getFiles, getMetadataChecksum, getProperty, getQdata, getSubdirs.
Setters
setContentsChecksum, setData, setDataFull, setMetadataChecksum, setProperty.
checkError
mutableTreeCheckError Source #
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> m () | (Can throw |
In some cases, a tree may be in a "lazy" state that loads data in the background; if an error occurred during a non-throwing API call, it will have been cached. This function checks for a cached error. The tree remains in error state.
Since: 2018.7
ensureDir
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> Text |
|
-> m MutableTree | (Can throw |
Returns the subdirectory of self with filename name
, creating an empty one
it if it doesn't exist.
ensureParentDirs
mutableTreeEnsureParentDirs Source #
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> [Text] |
|
-> Text |
|
-> m MutableTree | (Can throw |
Create all parent trees necessary for the given splitPath
to
exist.
fillEmptyFromDirtree
mutableTreeFillEmptyFromDirtree Source #
:: (HasCallStack, MonadIO m, IsMutableTree a, IsRepo b) | |
=> a | |
-> b | |
-> Text | |
-> Text | |
-> m Bool | Returns: This function enables optimisations when composing trees. The provided checksums are not loaded or checked when this function is called. Instead the contents will be loaded only when needed. |
Merges self
with the tree given by contentsChecksum
and
metadataChecksum
, but only if it's possible without writing new objects to
the repo
. We can do this if either self
is empty, the tree given by
contentsChecksum
is empty or if both trees already have the same
contentsChecksum
.
Since: 2018.7
getContentsChecksum
mutableTreeGetContentsChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m Text Source #
No description available in the introspection data.
getFiles
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a | |
-> m (Map Text Text) | Returns: All children files (the value is a checksum) |
No description available in the introspection data.
getMetadataChecksum
mutableTreeGetMetadataChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> m Text Source #
No description available in the introspection data.
lookup
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text, Maybe MutableTree) | (Can throw |
Lookup name
and returns outFileChecksum
or outSubdir
depending on its
file type.
new
:: (HasCallStack, MonadIO m) | |
=> m MutableTree | Returns: A new tree |
No description available in the introspection data.
newFromChecksum
mutableTreeNewFromChecksum Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m MutableTree | Returns: A new tree |
Creates a new OstreeMutableTree with the contents taken from the given repo and checksums. The data will be loaded from the repo lazily as needed.
Since: 2018.7
newFromCommit
mutableTreeNewFromCommit Source #
:: (HasCallStack, MonadIO m, IsRepo a) | |
=> a |
|
-> Text |
|
-> m MutableTree | Returns: A new tree (Can throw |
Creates a new OstreeMutableTree with the contents taken from the given commit. The data will be loaded from the repo lazily as needed.
Since: 2021.5
remove
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () | (Can throw |
Remove the file or subdirectory named name
from the mutable tree self
.
Since: 2018.9
replaceFile
mutableTreeReplaceFile Source #
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a | |
-> Text | |
-> Text | |
-> m () | (Can throw |
No description available in the introspection data.
setContentsChecksum
mutableTreeSetContentsChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m () Source #
No description available in the introspection data.
setMetadataChecksum
mutableTreeSetMetadataChecksum :: (HasCallStack, MonadIO m, IsMutableTree a) => a -> Text -> m () Source #
No description available in the introspection data.
walk
:: (HasCallStack, MonadIO m, IsMutableTree a) | |
=> a |
|
-> [Text] |
|
-> Word32 |
|
-> m MutableTree | (Can throw |
Traverse start
number of elements starting from splitPath
; the
child will be returned in outSubdir
.