gio-0.13.11.0: Binding to GIO

Maintainer | gtk2hs-devel@lists.sourceforge.net
Stability | alpha
Portability | portable (depends on GHC)
Safe Haskell | Safe-Inferred
Language | Haskell98

System.GIO.File.FileMonitor

Contents

- Details
- Types
- Enums
- Methods
- Attributes
- Signals

Description

Synopsis

- newtype FileMonitor = FileMonitor (ForeignPtr FileMonitor)
- class GObjectClass o => FileMonitorClass o
- data FileMonitorEvent
  - = FileMonitorEventChanged
  - | FileMonitorEventChangesDoneHint
  - | FileMonitorEventDeleted
  - | FileMonitorEventCreated
  - | FileMonitorEventAttributeChanged
  - | FileMonitorEventPreUnmount
  - | FileMonitorEventUnmounted
  - | FileMonitorEventMoved
  - | FileMonitorEventRenamed
  - | FileMonitorEventMovedIn
  - | FileMonitorEventMovedOut
- fileMonitorCancel :: FileMonitorClass monitor => monitor -> IO Bool
- fileMonitorIsCancelled :: FileMonitorClass monitor => monitor -> IO Bool
- fileMonitorCancelled :: FileMonitorClass monitor => ReadAttr monitor Bool
- fileMonitorRateLimit :: FileMonitorClass monitor => Attr monitor Int
- fileMonitorChanged :: FileMonitorClass monitor => Signal monitor (Maybe File -> Maybe File -> FileMonitorEvent -> IO ())

# Details

Monitors a file or directory for changes.

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

To get informed about changes to the file or directory you are monitoring, connect to the "changed" signal. The signal will be emitted in the thread-default main context 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).

# Types

newtype FileMonitor Source #

Constructors

FileMonitor (ForeignPtr FileMonitor) |

#### Instances

Instances details

Eq FileMonitor Source # |
Instance details Defined in System.GIO.Types Methods (==) :: FileMonitor -> FileMonitor -> Bool Source # (/=) :: FileMonitor -> FileMonitor -> Bool Source #
Ord FileMonitor Source # |

Instance details

Defined in System.GIO.Types

Methods

compare :: FileMonitor -> FileMonitor -> Ordering Source #

(<) :: FileMonitor -> FileMonitor -> Bool Source #

(<=) :: FileMonitor -> FileMonitor -> Bool Source #

(>) :: FileMonitor -> FileMonitor -> Bool Source #

(>=) :: FileMonitor -> FileMonitor -> Bool Source #

max :: FileMonitor -> FileMonitor -> FileMonitor Source #

min :: FileMonitor -> FileMonitor -> FileMonitor Source #

FileMonitorClass FileMonitor Source # |
Instance details Defined in System.GIO.Types
GObjectClass FileMonitor Source # |
Instance details Defined in System.GIO.Types Methods toGObject :: FileMonitor -> GObject Source # unsafeCastGObject :: GObject -> FileMonitor Source #

class GObjectClass o => FileMonitorClass o Source #

#### Instances

Instances details

FileMonitorClass FileMonitor Source # |
Instance details Defined in System.GIO.Types

# Enums

data FileMonitorEvent Source #

Specifies what type of event a monitor event is.

Constructors

FileMonitorEventChanged |
FileMonitorEventChangesDoneHint |
FileMonitorEventDeleted |
FileMonitorEventCreated |
FileMonitorEventAttributeChanged |
FileMonitorEventPreUnmount |
FileMonitorEventUnmounted |
FileMonitorEventMoved |
FileMonitorEventRenamed |
FileMonitorEventMovedIn |
FileMonitorEventMovedOut |

#### Instances

Instances details

Bounded FileMonitorEvent Source # |
Instance details Defined in System.GIO.Enums Methods minBound :: FileMonitorEvent Source # maxBound :: FileMonitorEvent Source #
Enum FileMonitorEvent Source # |

Instance details

Defined in System.GIO.Enums

Methods

succ :: FileMonitorEvent -> FileMonitorEvent Source #

pred :: FileMonitorEvent -> FileMonitorEvent Source #

toEnum :: Int -> FileMonitorEvent Source #

fromEnum :: FileMonitorEvent -> Int Source #

enumFrom :: FileMonitorEvent -> [FileMonitorEvent] Source #

enumFromThen :: FileMonitorEvent -> FileMonitorEvent -> [FileMonitorEvent] Source #

enumFromTo :: FileMonitorEvent -> FileMonitorEvent -> [FileMonitorEvent] Source #

enumFromThenTo :: FileMonitorEvent -> FileMonitorEvent -> FileMonitorEvent -> [FileMonitorEvent] Source #

Show FileMonitorEvent Source # |
Instance details Defined in System.GIO.Enums Methods showsPrec :: Int -> FileMonitorEvent -> ShowS Source # show :: FileMonitorEvent -> String Source # showList :: [FileMonitorEvent] -> ShowS Source #
Eq FileMonitorEvent Source # |
Instance details Defined in System.GIO.Enums Methods (==) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source # (/=) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source #
Ord FileMonitorEvent Source # |

Instance details

Defined in System.GIO.Enums

Methods

compare :: FileMonitorEvent -> FileMonitorEvent -> Ordering Source #

(<) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source #

(<=) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source #

(>) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source #

(>=) :: FileMonitorEvent -> FileMonitorEvent -> Bool Source #

max :: FileMonitorEvent -> FileMonitorEvent -> FileMonitorEvent Source #

min :: FileMonitorEvent -> FileMonitorEvent -> FileMonitorEvent Source #

# Methods

fileMonitorCancel Source #

Arguments

:: FileMonitorClass monitor |
=> monitor |
-> IO Bool | returns `True` if monitor was cancelled.

Cancels a file monitor.

fileMonitorIsCancelled Source #

Arguments

:: FileMonitorClass monitor |
=> monitor |
-> IO Bool | returns `True` if monitor is canceled. `False` otherwise.

Returns whether the monitor is canceled.

# Attributes

fileMonitorCancelled :: FileMonitorClass monitor => ReadAttr monitor Bool Source #

Whether the monitor has been cancelled.

Default value: `False`

fileMonitorRateLimit :: FileMonitorClass monitor => Attr monitor Int Source #

The limit of the monitor to watch for changes, in milliseconds.

Allowed values: >= 0

Default value: 800

# Signals

fileMonitorChanged :: FileMonitorClass monitor => Signal monitor (Maybe File -> Maybe File -> FileMonitorEvent -> IO ()) Source #