root / docstrings / pyinotify._SysProcessEvent-class.html

Revision a17385ae4cd3f952f689cfeee0d6e04841a4325e, 21.6 kB (checked in by Sebastien Martini <seb@…>, 7 hours ago)

Updated docstrings generated documentation.

  • Property mode set to 100644
Line 
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>pyinotify._SysProcessEvent</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="pyinotify-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33      <th class="navbar" width="100%"></th>
34  </tr>
35</table>
36<table width="100%" cellpadding="0" cellspacing="0">
37  <tr valign="top">
38    <td width="100%">
39      <span class="breadcrumbs">
40        <a href="pyinotify-module.html">Module&nbsp;pyinotify</a> ::
41        Class&nbsp;_SysProcessEvent
42      </span>
43    </td>
44    <td>
45      <table cellpadding="0" cellspacing="0">
46        <!-- hide/show private -->
47        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
48    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
49        <tr><td align="right"><span class="options"
50            >[<a href="frames.html" target="_top">frames</a
51            >]&nbsp;|&nbsp;<a href="pyinotify._SysProcessEvent-class.html"
52            target="_top">no&nbsp;frames</a>]</span></td></tr>
53      </table>
54    </td>
55  </tr>
56</table>
57<!-- ==================== CLASS DESCRIPTION ==================== -->
58<h1 class="epydoc">Class _SysProcessEvent</h1><p class="nomargin-top"><span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent">source&nbsp;code</a></span></p>
59<center>
60<center>  <map id="uml_class_diagram_for_pyinotif_29" name="uml_class_diagram_for_pyinotif_29">
61<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,129,292,148"/>
62<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#cleanup" title="Cleanup (delete) old (&gt;1mn) records contained in self._mv_cookie and &#160;self._mv." alt="" coords="17,148,292,166"/>
63<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_CREATE" title="If the event concerns a directory and the auto_add flag of the targetted &#160;watch is set to True, a new watch is added on this new directory, with the &#160;same attributes&#39;s values than those of this watch." alt="" coords="17,166,292,185"/>
64<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_MOVED_FROM" title="Map the cookie with the source path (+ date for cleaning)." alt="" coords="17,185,292,204"/>
65<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_MOVED_TO" title="Map the source path with the destination path (+ date for cleaning)." alt="" coords="17,204,292,222"/>
66<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_MOVE_SELF" title="STATUS: the following bug has been fixed in the recent kernels (fixme: &#160;which version ?)." alt="" coords="17,222,292,241"/>
67<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_Q_OVERFLOW" title="Only signal overflow, most of the common flags are irrelevant for this &#160;event (path, wd, name)." alt="" coords="17,241,292,260"/>
68<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_IN_IGNORED" title="The watch descriptor raised by this event is now ignored (forever), it can &#160;be safely deleted from watch manager dictionary." alt="" coords="17,260,292,278"/>
69<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html#process_default" title="Common handling for the following events:" alt="" coords="17,278,292,297"/>
70<area shape="rect" href="pyinotify._SysProcessEvent&#45;class.html" title="There is three kind of processing according to each event:" alt="" coords="16,104,293,298"/>
71<area shape="rect" href="pyinotify._ProcessEvent&#45;class.html#__call__" title="To behave like a functor the object must be callable." alt="" coords="95,36,215,54"/>
72<area shape="rect" href="pyinotify._ProcessEvent&#45;class.html#__repr__" title="repr(x)" alt="" coords="95,54,215,73"/>
73<area shape="rect" href="pyinotify._ProcessEvent&#45;class.html" title="Abstract processing event class." alt="" coords="93,10,216,74"/>
74</map>
75  <img src="uml_class_diagram_for_pyinotif_29.gif" alt='' usemap="#uml_class_diagram_for_pyinotif_29" ismap="ismap" class="graph-without-title" />
76</center>
77</center>
78<hr />
79<p>There is three kind of processing according to each event:</p>
80  <ol start="1">
81    <li>
82      special handling (deletion from internal container, bug, ...).
83    </li>
84    <li>
85      default treatment: which is applied to most of events.
86    </li>
87  </ol>
88  <ol start="4">
89    <li>
90      IN_ISDIR is never sent alone, he is piggybacked with a standart
91      event, he is not processed as the others events, instead, its value
92      is captured and appropriately aggregated to dst event.
93    </li>
94  </ol>
95
96<!-- ==================== INSTANCE METHODS ==================== -->
97<a name="section-InstanceMethods"></a>
98<table class="summary" border="1" cellpadding="3"
99       cellspacing="0" width="100%" bgcolor="white">
100<tr bgcolor="#70b0f0" class="table-header">
101  <td colspan="2" class="table-header">
102    <table border="0" cellpadding="0" cellspacing="0" width="100%">
103      <tr valign="top">
104        <td align="left"><span class="table-header">Instance Methods</span></td>
105        <td align="right" valign="top"
106         ><span class="options">[<a href="#section-InstanceMethods"
107         class="privatelink" onclick="toggle_private();"
108         >hide private</a>]</span></td>
109      </tr>
110    </table>
111  </td>
112</tr>
113<tr>
114    <td width="15%" align="right" valign="top" class="summary">
115      <span class="summary-type">&nbsp;</span>
116    </td><td class="summary">
117      <table width="100%" cellpadding="0" cellspacing="0" border="0">
118        <tr>
119          <td><span class="summary-sig"><a href="pyinotify._SysProcessEvent-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
120        <span class="summary-sig-arg">wm</span>,
121        <span class="summary-sig-arg">notifier</span>)</span><br />
122      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
123          <td align="right" valign="top">
124            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.__init__">source&nbsp;code</a></span>
125           
126          </td>
127        </tr>
128      </table>
129     
130    </td>
131  </tr>
132<tr>
133    <td width="15%" align="right" valign="top" class="summary">
134      <span class="summary-type">&nbsp;</span>
135    </td><td class="summary">
136      <table width="100%" cellpadding="0" cellspacing="0" border="0">
137        <tr>
138          <td><span class="summary-sig"><a name="cleanup"></a><span class="summary-sig-name">cleanup</span>(<span class="summary-sig-arg">self</span>)</span><br />
139      Cleanup (delete) old (&gt;1mn) records contained in self._mv_cookie
140      and self._mv.</td>
141          <td align="right" valign="top">
142            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.cleanup">source&nbsp;code</a></span>
143           
144          </td>
145        </tr>
146      </table>
147     
148    </td>
149  </tr>
150<tr>
151    <td width="15%" align="right" valign="top" class="summary">
152      <span class="summary-type">&nbsp;</span>
153    </td><td class="summary">
154      <table width="100%" cellpadding="0" cellspacing="0" border="0">
155        <tr>
156          <td><span class="summary-sig"><a name="process_IN_CREATE"></a><span class="summary-sig-name">process_IN_CREATE</span>(<span class="summary-sig-arg">self</span>,
157        <span class="summary-sig-arg">raw_event</span>)</span><br />
158      If the event concerns a directory and the auto_add flag of the
159      targetted watch is set to True, a new watch is added on this new
160      directory, with the same attributes's values than those of this
161      watch.</td>
162          <td align="right" valign="top">
163            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_CREATE">source&nbsp;code</a></span>
164           
165          </td>
166        </tr>
167      </table>
168     
169    </td>
170  </tr>
171<tr>
172    <td width="15%" align="right" valign="top" class="summary">
173      <span class="summary-type">&nbsp;</span>
174    </td><td class="summary">
175      <table width="100%" cellpadding="0" cellspacing="0" border="0">
176        <tr>
177          <td><span class="summary-sig"><a name="process_IN_MOVED_FROM"></a><span class="summary-sig-name">process_IN_MOVED_FROM</span>(<span class="summary-sig-arg">self</span>,
178        <span class="summary-sig-arg">raw_event</span>)</span><br />
179      Map the cookie with the source path (+ date for cleaning).</td>
180          <td align="right" valign="top">
181            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_MOVED_FROM">source&nbsp;code</a></span>
182           
183          </td>
184        </tr>
185      </table>
186     
187    </td>
188  </tr>
189<tr>
190    <td width="15%" align="right" valign="top" class="summary">
191      <span class="summary-type">&nbsp;</span>
192    </td><td class="summary">
193      <table width="100%" cellpadding="0" cellspacing="0" border="0">
194        <tr>
195          <td><span class="summary-sig"><a name="process_IN_MOVED_TO"></a><span class="summary-sig-name">process_IN_MOVED_TO</span>(<span class="summary-sig-arg">self</span>,
196        <span class="summary-sig-arg">raw_event</span>)</span><br />
197      Map the source path with the destination path (+ date for cleaning).</td>
198          <td align="right" valign="top">
199            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_MOVED_TO">source&nbsp;code</a></span>
200           
201          </td>
202        </tr>
203      </table>
204     
205    </td>
206  </tr>
207<tr>
208    <td width="15%" align="right" valign="top" class="summary">
209      <span class="summary-type">&nbsp;</span>
210    </td><td class="summary">
211      <table width="100%" cellpadding="0" cellspacing="0" border="0">
212        <tr>
213          <td><span class="summary-sig"><a href="pyinotify._SysProcessEvent-class.html#process_IN_MOVE_SELF" class="summary-sig-name">process_IN_MOVE_SELF</a>(<span class="summary-sig-arg">self</span>,
214        <span class="summary-sig-arg">raw_event</span>)</span><br />
215      STATUS: the following bug has been fixed in the recent kernels
216      (fixme: which version ?).</td>
217          <td align="right" valign="top">
218            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_MOVE_SELF">source&nbsp;code</a></span>
219           
220          </td>
221        </tr>
222      </table>
223     
224    </td>
225  </tr>
226<tr>
227    <td width="15%" align="right" valign="top" class="summary">
228      <span class="summary-type">&nbsp;</span>
229    </td><td class="summary">
230      <table width="100%" cellpadding="0" cellspacing="0" border="0">
231        <tr>
232          <td><span class="summary-sig"><a name="process_IN_Q_OVERFLOW"></a><span class="summary-sig-name">process_IN_Q_OVERFLOW</span>(<span class="summary-sig-arg">self</span>,
233        <span class="summary-sig-arg">raw_event</span>)</span><br />
234      Only signal overflow, most of the common flags are irrelevant for
235      this event (path, wd, name).</td>
236          <td align="right" valign="top">
237            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_Q_OVERFLOW">source&nbsp;code</a></span>
238           
239          </td>
240        </tr>
241      </table>
242     
243    </td>
244  </tr>
245<tr>
246    <td width="15%" align="right" valign="top" class="summary">
247      <span class="summary-type">&nbsp;</span>
248    </td><td class="summary">
249      <table width="100%" cellpadding="0" cellspacing="0" border="0">
250        <tr>
251          <td><span class="summary-sig"><a href="pyinotify._SysProcessEvent-class.html#process_IN_IGNORED" class="summary-sig-name">process_IN_IGNORED</a>(<span class="summary-sig-arg">self</span>,
252        <span class="summary-sig-arg">raw_event</span>)</span><br />
253      The watch descriptor raised by this event is now ignored (forever),
254      it can be safely deleted from watch manager dictionary.</td>
255          <td align="right" valign="top">
256            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_IGNORED">source&nbsp;code</a></span>
257           
258          </td>
259        </tr>
260      </table>
261     
262    </td>
263  </tr>
264<tr>
265    <td width="15%" align="right" valign="top" class="summary">
266      <span class="summary-type">&nbsp;</span>
267    </td><td class="summary">
268      <table width="100%" cellpadding="0" cellspacing="0" border="0">
269        <tr>
270          <td><span class="summary-sig"><a href="pyinotify._SysProcessEvent-class.html#process_default" class="summary-sig-name">process_default</a>(<span class="summary-sig-arg">self</span>,
271        <span class="summary-sig-arg">raw_event</span>,
272        <span class="summary-sig-arg">to_append</span>=<span class="summary-sig-default"><code class="variable-group">{</code><code class="variable-group">}</code></span>)</span><br />
273      Common handling for the following events:</td>
274          <td align="right" valign="top">
275            <span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_default">source&nbsp;code</a></span>
276           
277          </td>
278        </tr>
279      </table>
280     
281    </td>
282  </tr>
283  <tr>
284    <td colspan="2" class="summary">
285    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="pyinotify._ProcessEvent-class.html" onclick="show_private();">_ProcessEvent</a></code></b>:
286      <code><a href="pyinotify._ProcessEvent-class.html#__call__">__call__</a></code>,
287      <code><a href="pyinotify._ProcessEvent-class.html#__repr__">__repr__</a></code>
288      </p>
289    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
290      <code>__delattr__</code>,
291      <code>__getattribute__</code>,
292      <code>__hash__</code>,
293      <code>__new__</code>,
294      <code>__reduce__</code>,
295      <code>__reduce_ex__</code>,
296      <code>__setattr__</code>,
297      <code>__str__</code>
298      </p>
299    </td>
300  </tr>
301</table>
302<!-- ==================== PROPERTIES ==================== -->
303<a name="section-Properties"></a>
304<table class="summary" border="1" cellpadding="3"
305       cellspacing="0" width="100%" bgcolor="white">
306<tr bgcolor="#70b0f0" class="table-header">
307  <td colspan="2" class="table-header">
308    <table border="0" cellpadding="0" cellspacing="0" width="100%">
309      <tr valign="top">
310        <td align="left"><span class="table-header">Properties</span></td>
311        <td align="right" valign="top"
312         ><span class="options">[<a href="#section-Properties"
313         class="privatelink" onclick="toggle_private();"
314         >hide private</a>]</span></td>
315      </tr>
316    </table>
317  </td>
318</tr>
319  <tr>
320    <td colspan="2" class="summary">
321    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
322      <code>__class__</code>
323      </p>
324    </td>
325  </tr>
326</table>
327<!-- ==================== METHOD DETAILS ==================== -->
328<a name="section-MethodDetails"></a>
329<table class="details" border="1" cellpadding="3"
330       cellspacing="0" width="100%" bgcolor="white">
331<tr bgcolor="#70b0f0" class="table-header">
332  <td colspan="2" class="table-header">
333    <table border="0" cellpadding="0" cellspacing="0" width="100%">
334      <tr valign="top">
335        <td align="left"><span class="table-header">Method Details</span></td>
336        <td align="right" valign="top"
337         ><span class="options">[<a href="#section-MethodDetails"
338         class="privatelink" onclick="toggle_private();"
339         >hide private</a>]</span></td>
340      </tr>
341    </table>
342  </td>
343</tr>
344</table>
345<a name="__init__"></a>
346<div>
347<table class="details" border="1" cellpadding="3"
348       cellspacing="0" width="100%" bgcolor="white">
349<tr><td>
350  <table width="100%" cellpadding="0" cellspacing="0" border="0">
351  <tr valign="top"><td>
352  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
353        <span class="sig-arg">wm</span>,
354        <span class="sig-arg">notifier</span>)</span>
355    <br /><em class="fname">(Constructor)</em>
356  </h3>
357  </td><td align="right" valign="top"
358    ><span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.__init__">source&nbsp;code</a></span>&nbsp;
359    </td>
360  </tr></table>
361 
362  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for
363  signature</p>
364  <dl class="fields">
365    <dt>Parameters:</dt>
366    <dd><ul class="nomargin-top">
367        <li><strong class="pname"><code>wm</code></strong> (WatchManager instance) - Watch Manager.</li>
368        <li><strong class="pname"><code>notifier</code></strong> (Instance of Notifier.) - notifier.</li>
369    </ul></dd>
370    <dt>Overrides:
371        object.__init__
372    </dt>
373  </dl>
374</td></tr></table>
375</div>
376<a name="process_IN_MOVE_SELF"></a>
377<div>
378<table class="details" border="1" cellpadding="3"
379       cellspacing="0" width="100%" bgcolor="white">
380<tr><td>
381  <table width="100%" cellpadding="0" cellspacing="0" border="0">
382  <tr valign="top"><td>
383  <h3 class="epydoc"><span class="sig"><span class="sig-name">process_IN_MOVE_SELF</span>(<span class="sig-arg">self</span>,
384        <span class="sig-arg">raw_event</span>)</span>
385  </h3>
386  </td><td align="right" valign="top"
387    ><span class="codelink"><a href="pyinotify-pysrc.html#_SysProcessEvent.process_IN_MOVE_SELF">source&nbsp;code</a></span>&nbsp;
388    </td>
389  </tr></table>
390 
391  <p>STATUS: the following bug has been fixed in the recent kernels (fixme:
392  which version ?). Now it raises IN_DELETE_SELF instead.</p>
393  <p>Old kernels are bugged, this event is raised when the watched item was
394  moved, so we must update its path, but under some circumstances it can be
395  impossible: if its parent directory and its destination directory aren't
396  watched. The kernel (see include/linux/fsnotify.h) doesn't bring us
397  enough informations like the destination path of moved items.</p>
398  <dl class="fields">
399  </dl>
400</td></tr></table>
401</div>
402<a name="process_IN_IGNORED"></a>
403<div>
404<table class="details" border="1" cellpadding="3"
405       cellspacing="0" width="100%" bgcolor="white">
406<tr><td>
407  <table width="100%" cellpadding="0" cellspacing="0" border="0">
408  <tr valign="top"><td>
409  <h3 class="epydoc"><span class="sig"><span