Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
IBusObservedPath provides methods for file path manipulation, such as monitor modification, directory tree traversal.
Synopsis
- newtype ObservedPath = ObservedPath (ManagedPtr ObservedPath)
- class (GObject o, IsDescendantOf ObservedPath o) => IsObservedPath o
- toObservedPath :: (MonadIO m, IsObservedPath o) => o -> m ObservedPath
- observedPathCheckModification :: (HasCallStack, MonadIO m, IsObservedPath a) => a -> m Bool
- observedPathNew :: (HasCallStack, MonadIO m) => Text -> Bool -> m ObservedPath
- observedPathNewFromXmlNode :: (HasCallStack, MonadIO m) => XML -> Bool -> m ObservedPath
- observedPathOutput :: (HasCallStack, MonadIO m, IsObservedPath a) => a -> String -> Int32 -> m ()
- observedPathTraverse :: (HasCallStack, MonadIO m, IsObservedPath a) => a -> Bool -> m [ObservedPath]
Exported types
newtype ObservedPath Source #
Memory-managed wrapper type.
Instances
Eq ObservedPath Source # | |
Defined in GI.IBus.Objects.ObservedPath (==) :: ObservedPath -> ObservedPath -> Bool # (/=) :: ObservedPath -> ObservedPath -> Bool # | |
IsGValue ObservedPath Source # | Convert |
Defined in GI.IBus.Objects.ObservedPath toGValue :: ObservedPath -> IO GValue # fromGValue :: GValue -> IO ObservedPath # | |
GObject ObservedPath Source # | |
Defined in GI.IBus.Objects.ObservedPath gobjectType :: IO GType # | |
HasParentTypes ObservedPath Source # | |
Defined in GI.IBus.Objects.ObservedPath | |
type ParentTypes ObservedPath Source # | |
Defined in GI.IBus.Objects.ObservedPath |
class (GObject o, IsDescendantOf ObservedPath o) => IsObservedPath o Source #
Type class for types which can be safely cast to ObservedPath
, for instance with toObservedPath
.
Instances
(GObject o, IsDescendantOf ObservedPath o) => IsObservedPath o Source # | |
Defined in GI.IBus.Objects.ObservedPath |
toObservedPath :: (MonadIO m, IsObservedPath o) => o -> m ObservedPath Source #
Cast to ObservedPath
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
checkModification
observedPathCheckModification Source #
:: (HasCallStack, MonadIO m, IsObservedPath a) | |
=> a |
|
-> m Bool | Returns: |
Checks whether the path is modified by comparing the mtime in object and mtime in file system.
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Bool |
|
-> m ObservedPath | Returns: A newly allocated |
Creates a new ObservedPath
from an XML node.
newFromXmlNode
observedPathNewFromXmlNode Source #
:: (HasCallStack, MonadIO m) | |
=> XML |
|
-> Bool |
|
-> m ObservedPath | Returns: A newly allocated |
Creates an new ObservedPath
from an XML node.
output
:: (HasCallStack, MonadIO m, IsObservedPath a) | |
=> a |
|
-> String |
|
-> Int32 |
|
-> m () |
Append the observed path to a string with following format: <path mtime="<i>modified time</i>" ><i>path</i></path>
traverse
:: (HasCallStack, MonadIO m, IsObservedPath a) | |
=> a |
|
-> Bool |
|
-> m [ObservedPath] | Returns: A newly allocate
GList which holds content in path; NULL if |
Recursively traverse the path and put the files and subdirectory in to
a newly allocated
GLists, if the path
is a directory. Otherwise returns NULL.