gi-ibus-1.5.5: IBus bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.IBus.Objects.ObservedPath

Description

IBusObservedPath provides methods for file path manipulation, such as monitor modification, directory tree traversal.

Synopsis

Exported types

newtype ObservedPath Source #

Memory-managed wrapper type.

Constructors

ObservedPath (ManagedPtr ObservedPath) 

Instances

Instances details
Eq ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

GObject ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

ManagedPtrNewtype ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

Methods

toManagedPtr :: ObservedPath -> ManagedPtr ObservedPath

TypedObject ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

Methods

glibType :: IO GType

HasParentTypes ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

IsGValue (Maybe ObservedPath) Source #

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

Instance details

Defined in GI.IBus.Objects.ObservedPath

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes ObservedPath Source # 
Instance details

Defined in GI.IBus.Objects.ObservedPath

type ParentTypes ObservedPath = '[Serializable, Object, Object]

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

Instances details
(GObject o, IsDescendantOf ObservedPath o) => IsObservedPath o Source # 
Instance details

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

checkModification

observedPathCheckModification Source #

Arguments

:: (HasCallStack, MonadIO m, IsObservedPath a) 
=> a

path: An IBusObservedPath.

-> m Bool

Returns: True if imtime is changed, otherwise False.

Checks whether the path is modified by comparing the mtime in object and mtime in file system.

new

observedPathNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

path: The path string.

-> Bool

fillStat: Auto-fill the path status.

-> m ObservedPath

Returns: A newly allocated ObservedPath.

Creates a new ObservedPath from an XML node.

newFromXmlNode

observedPathNewFromXmlNode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> XML

node: An XML node that contain path.

-> Bool

fillStat: Auto-fill the path status.

-> m ObservedPath

Returns: A newly allocated ObservedPath.

Creates an new ObservedPath from an XML node.

output

observedPathOutput Source #

Arguments

:: (HasCallStack, MonadIO m, IsObservedPath a) 
=> a

path: An IBusObservedPath.

-> String

output: Path is appended to.

-> Int32

indent: number of indent.

-> m () 

Append the observed path to a string with following format: <path mtime="<i>modified time</i>" ><i>path</i></path>

traverse

observedPathTraverse Source #

Arguments

:: (HasCallStack, MonadIO m, IsObservedPath a) 
=> a

path: An IBusObservedPath.

-> Bool

dirOnly: Only looks for subdirs, not files

-> m [ObservedPath]

Returns: A newly allocate GList which holds content in path; NULL if path is not directory.

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.