| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/gtk-doc/html/gio/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GFileMonitor</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GIO Reference Manual">
<link rel="up" href="file_mon.html" title="File System Monitoring">
<link rel="prev" href="file_mon.html" title="File System Monitoring">
<link rel="next" href="async.html" title="Asynchronous I/O">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part I. GIO Overview">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="Compiling GIO applications">
<link rel="chapter" href="ch03.html" title="Running GIO applications">
<link rel="chapter" href="extending-gio.html" title="Extending GIO">
<link rel="part" href="pt02.html" title="Part II. API Reference">
<link rel="chapter" href="file_ops.html" title="File Operations">
<link rel="chapter" href="file_mon.html" title="File System Monitoring">
<link rel="chapter" href="async.html" title="Asynchronous I/O">
<link rel="chapter" href="streaming.html" title="Streaming I/O">
<link rel="chapter" href="types.html" title="File types and applications">
<link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
<link rel="chapter" href="icons.html" title="Icons">
<link rel="chapter" href="failable_initialization.html" title="Failable Initialization">
<link rel="chapter" href="networking.html" title="Lowlevel platform-independent network support">
<link rel="chapter" href="resolver.html" title="DNS resolution">
<link rel="chapter" href="highlevel-socket.html" title="Highlevel network functionallity">
<link rel="chapter" href="utils.html" title="Utilities">
<link rel="chapter" href="extending.html" title="Extending GIO">
<link rel="part" href="migrating.html" title="Part III. Migrating to GIO">
<link rel="chapter" href="ch18.html" title="Migrating from POSIX to GIO">
<link rel="chapter" href="ch19.html" title="Migrating from GnomeVFS to GIO">
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.18">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.20">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.22">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="file_mon.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="file_mon.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="async.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GFileMonitor.synopsis" class="shortcut">Top</a>
|
<a href="#GFileMonitor.description" class="shortcut">Description</a>
|
<a href="#GFileMonitor.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#GFileMonitor.properties" class="shortcut">Properties</a>
|
<a href="#GFileMonitor.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="GFileMonitor">
<a name="GFileMonitor"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GFileMonitor.top_of_page"></a>GFileMonitor</span></h2>
<p>GFileMonitor — File Monitor</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="GFileMonitor.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <gio/gio.h>
enum <a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent">GFileMonitorEvent</a>;
<a class="link" href="GFileMonitor.html#GFileMonitor-struct" title="GFileMonitor">GFileMonitor</a>;
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="GFileMonitor.html#g-file-monitor-cancel" title="g_file_monitor_cancel ()">g_file_monitor_cancel</a> (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> <a class="link" href="GFileMonitor.html#g-file-monitor-is-cancelled" title="g_file_monitor_is_cancelled ()">g_file_monitor_is_cancelled</a> (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor);
void <a class="link" href="GFileMonitor.html#g-file-monitor-set-rate-limit" title="g_file_monitor_set_rate_limit ()">g_file_monitor_set_rate_limit</a> (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor,
int limit_msecs);
void <a class="link" href="GFileMonitor.html#g-file-monitor-emit-event" title="g_file_monitor_emit_event ()">g_file_monitor_emit_event</a> (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor,
<a class="link" href="GFile.html" title="GFile">GFile</a> *child,
<a class="link" href="GFile.html" title="GFile">GFile</a> *other_file,
<a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent">GFileMonitorEvent</a> event_type);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="GFileMonitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----GFileMonitor
</pre>
</div>
<div class="refsect1" title="Properties">
<a name="GFileMonitor.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="GFileMonitor.html#GFileMonitor--cancelled" title='The "cancelled" property'>cancelled</a>" <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read
"<a class="link" href="GFileMonitor.html#GFileMonitor--rate-limit" title='The "rate-limit" property'>rate-limit</a>" <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> : Read / Write
</pre>
</div>
<div class="refsect1" title="Signals">
<a name="GFileMonitor.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="GFileMonitor.html#GFileMonitor-changed" title='The "changed" signal'>changed</a>" : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="GFileMonitor.description"></a><h2>Description</h2>
<p>
Monitors a file or directory for changes.
</p>
<p>
To obtain a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a> for a file or directory, use
<a class="link" href="GFile.html#g-file-monitor" title="g_file_monitor ()"><code class="function">g_file_monitor()</code></a>, <a class="link" href="GFile.html#g-file-monitor-file" title="g_file_monitor_file ()"><code class="function">g_file_monitor_file()</code></a>, or
<a class="link" href="GFile.html#g-file-monitor-directory" title="g_file_monitor_directory ()"><code class="function">g_file_monitor_directory()</code></a>.
</p>
<p>
To get informed about changes to the file or directory you are
monitoring, connect to the <a class="link" href="GFileMonitor.html#GFileMonitor-changed" title='The "changed" signal'><span class="type">"changed"</span></a> signal. The
signal will be emitted in the <a
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"
>thread-default main
context</a> 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).</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="GFileMonitor.details"></a><h2>Details</h2>
<div class="refsect2" title="enum GFileMonitorEvent">
<a name="GFileMonitorEvent"></a><h3>enum GFileMonitorEvent</h3>
<pre class="programlisting">typedef enum {
G_FILE_MONITOR_EVENT_CHANGED,
G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT,
G_FILE_MONITOR_EVENT_DELETED,
G_FILE_MONITOR_EVENT_CREATED,
G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED,
G_FILE_MONITOR_EVENT_PRE_UNMOUNT,
G_FILE_MONITOR_EVENT_UNMOUNTED
} GFileMonitorEvent;
</pre>
<p>
Specifies what type of event a monitor event is.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-CHANGED--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_CHANGED</code></span></p></td>
<td> a file changed.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-CHANGES-DONE-HINT--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT</code></span></p></td>
<td> a hint that this was probably the last change in a set of changes.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-DELETED--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_DELETED</code></span></p></td>
<td> a file was deleted.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-CREATED--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_CREATED</code></span></p></td>
<td> a file was created.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-ATTRIBUTE-CHANGED--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED</code></span></p></td>
<td> a file attribute was changed.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-PRE-UNMOUNT--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_PRE_UNMOUNT</code></span></p></td>
<td> the file location will soon be unmounted.
</td>
</tr>
<tr>
<td><p><a name="G-FILE-MONITOR-EVENT-UNMOUNTED--CAPS"></a><span class="term"><code class="literal">G_FILE_MONITOR_EVENT_UNMOUNTED</code></span></p></td>
<td> the file location was unmounted.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GFileMonitor">
<a name="GFileMonitor-struct"></a><h3>GFileMonitor</h3>
<pre class="programlisting">typedef struct _GFileMonitor GFileMonitor;</pre>
<p>
Watches for changes to a file.</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="g_file_monitor_cancel ()">
<a name="g-file-monitor-cancel"></a><h3>g_file_monitor_cancel ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> g_file_monitor_cancel (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor);</pre>
<p>
Cancels a file monitor.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if monitor was cancelled.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_file_monitor_is_cancelled ()">
<a name="g-file-monitor-is-cancelled"></a><h3>g_file_monitor_is_cancelled ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> g_file_monitor_is_cancelled (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor);</pre>
<p>
Returns whether the monitor is canceled.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if monitor is canceled. <a
href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
><code class="literal">FALSE</code></a> otherwise.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_file_monitor_set_rate_limit ()">
<a name="g-file-monitor-set-rate-limit"></a><h3>g_file_monitor_set_rate_limit ()</h3>
<pre class="programlisting">void g_file_monitor_set_rate_limit (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor,
int limit_msecs);</pre>
<p>
Sets the rate limit to which the <em class="parameter"><code>monitor</code></em> will report
consecutive change events to the same file.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>limit_msecs</code></em> :</span></p></td>
<td> a integer with the limit in milliseconds to
poll for changes.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_file_monitor_emit_event ()">
<a name="g-file-monitor-emit-event"></a><h3>g_file_monitor_emit_event ()</h3>
<pre class="programlisting">void g_file_monitor_emit_event (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor,
<a class="link" href="GFile.html" title="GFile">GFile</a> *child,
<a class="link" href="GFile.html" title="GFile">GFile</a> *other_file,
<a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent">GFileMonitorEvent</a> event_type);</pre>
<p>
Emits the <a class="link" href="GFileMonitor.html#GFileMonitor-changed" title='The "changed" signal'><span class="type">"changed"</span></a> signal if a change
has taken place. Should be called from file monitor
implementations only.
</p>
<p>
The signal will be emitted from an idle handler (in the <a
href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"
>thread-default main
context</a>).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>other_file</code></em> :</span></p></td>
<td> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event_type</code></em> :</span></p></td>
<td> a set of <a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent"><span class="type">GFileMonitorEvent</span></a> flags.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="GFileMonitor.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "cancelled" property'>
<a name="GFileMonitor--cancelled"></a><h3>The <code class="literal">"cancelled"</code> property</h3>
<pre class="programlisting"> "cancelled" <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read</pre>
<p>Whether the monitor has been cancelled.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" title='The "rate-limit" property'>
<a name="GFileMonitor--rate-limit"></a><h3>The <code class="literal">"rate-limit"</code> property</h3>
<pre class="programlisting"> "rate-limit" <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> : Read / Write</pre>
<p>The limit of the monitor to watch for changes, in milliseconds.</p>
<p>Allowed values: >= 0</p>
<p>Default value: 800</p>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="GFileMonitor.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "changed" signal'>
<a name="GFileMonitor-changed"></a><h3>The <code class="literal">"changed"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="GFileMonitor.html" title="GFileMonitor">GFileMonitor</a> *monitor,
<a class="link" href="GFile.html" title="GFile">GFile</a> *file,
<a class="link" href="GFile.html" title="GFile">GFile</a> *other_file,
<a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent">GFileMonitorEvent</a> event_type,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run Last</pre>
<p>
Emitted when a file has been changed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>monitor</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html" title="GFileMonitor"><span class="type">GFileMonitor</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
<td> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>other_file</code></em> :</span></p></td>
<td> a <a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event_type</code></em> :</span></p></td>
<td> a <a class="link" href="GFileMonitor.html#GFileMonitorEvent" title="enum GFileMonitorEvent"><span class="type">GFileMonitorEvent</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>