gi-gio-2.0.11: Gio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.FileMonitor

Contents

Description

Monitors a file or directory for changes.

To obtain a FileMonitor for a file or directory, use fileMonitor, fileMonitorFile, or fileMonitorDirectory.

To get informed about changes to the file or directory you are monitoring, connect to the FileMonitor::changed signal. The signal will be emitted in the [thread-default main context][g-main-context-push-thread-default] of the thread that the monitor was created in (though if the global default main context is blocked, this may cause notifications to be blocked even if the thread-default context is still running).

Synopsis

Exported types

Methods

cancel

fileMonitorCancel Source #

Arguments

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

monitor: a FileMonitor.

-> m Bool

Returns: always True

Cancels a file monitor.

emitEvent

fileMonitorEmitEvent Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileMonitor a, IsFile b, IsFile c) 
=> a

monitor: a FileMonitor.

-> b

child: a File.

-> c

otherFile: a File.

-> FileMonitorEvent

eventType: a set of FileMonitorEvent flags.

-> m () 

Emits the FileMonitor::changed signal if a change has taken place. Should be called from file monitor implementations only.

Implementations are responsible to call this method from the [thread-default main context][g-main-context-push-thread-default] of the thread that the monitor was created in.

isCancelled

fileMonitorIsCancelled Source #

Arguments

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

monitor: a FileMonitor

-> m Bool

Returns: True if monitor is canceled. False otherwise.

Returns whether the monitor is canceled.

setRateLimit

fileMonitorSetRateLimit Source #

Arguments

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

monitor: a FileMonitor.

-> Int32

limitMsecs: a non-negative integer with the limit in milliseconds to poll for changes

-> m () 

Sets the rate limit to which the monitor will report consecutive change events to the same file.

Properties

cancelled

data FileMonitorCancelledPropertyInfo Source #

Instances

AttrInfo FileMonitorCancelledPropertyInfo Source # 
type AttrOrigin FileMonitorCancelledPropertyInfo Source # 
type AttrLabel FileMonitorCancelledPropertyInfo Source # 
type AttrGetType FileMonitorCancelledPropertyInfo Source # 
type AttrBaseTypeConstraint FileMonitorCancelledPropertyInfo Source # 
type AttrSetTypeConstraint FileMonitorCancelledPropertyInfo Source # 
type AttrAllowedOps FileMonitorCancelledPropertyInfo Source # 

rateLimit

data FileMonitorRateLimitPropertyInfo Source #

Instances

AttrInfo FileMonitorRateLimitPropertyInfo Source # 
type AttrOrigin FileMonitorRateLimitPropertyInfo Source # 
type AttrLabel FileMonitorRateLimitPropertyInfo Source # 
type AttrGetType FileMonitorRateLimitPropertyInfo Source # 
type AttrBaseTypeConstraint FileMonitorRateLimitPropertyInfo Source # 
type AttrSetTypeConstraint FileMonitorRateLimitPropertyInfo Source # 
type AttrAllowedOps FileMonitorRateLimitPropertyInfo Source # 

Signals

changed