ruby-inotify 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/Inotify/Event.html +206 -0
- data/doc/classes/Inotify/Event.src/M000005.html +18 -0
- data/doc/classes/Inotify/Event.src/M000006.html +18 -0
- data/doc/classes/Inotify/Event.src/M000007.html +18 -0
- data/doc/classes/Inotify/Event.src/M000008.html +18 -0
- data/doc/classes/Inotify/Event.src/M000009.html +18 -0
- data/doc/classes/Inotify/Event.src/M000010.html +18 -0
- data/doc/classes/Inotify/Event.src/M000011.html +18 -0
- data/doc/classes/Inotify/Event.src/M000012.html +23 -0
- data/doc/classes/Inotify/Event.src/M000013.html +23 -0
- data/doc/classes/Inotify/Event.src/M000014.html +18 -0
- data/doc/classes/Inotify/Event.src/M000015.html +23 -0
- data/doc/classes/Inotify/EventStruct.html +117 -0
- data/doc/classes/Inotify.html +476 -0
- data/doc/classes/Inotify.src/M000001.html +18 -0
- data/doc/classes/Inotify.src/M000002.html +18 -0
- data/doc/classes/Inotify.src/M000003.html +18 -0
- data/doc/classes/Inotify.src/M000004.html +22 -0
- data/doc/classes/Inotify.src/M000005.html +21 -0
- data/doc/classes/Inotify.src/M000006.html +21 -0
- data/doc/classes/Inotify.src/M000007.html +19 -0
- data/doc/classes/Inotify.src/M000008.html +18 -0
- data/doc/classes/Inotify.src/M000009.html +18 -0
- data/doc/classes/Inotify.src/M000010.html +18 -0
- data/doc/classes/Inotify.src/M000011.html +21 -0
- data/doc/classes/Inotify.src/M000012.html +21 -0
- data/doc/classes/Test1.html +212 -0
- data/doc/classes/Test1.src/M000001.html +18 -0
- data/doc/classes/Test1.src/M000002.html +18 -0
- data/doc/classes/Test1.src/M000003.html +18 -0
- data/doc/classes/Test1.src/M000004.html +20 -0
- data/doc/classes/Test1.src/M000005.html +30 -0
- data/doc/classes/Test1.src/M000006.html +18 -0
- data/doc/created.rid +1 -0
- data/doc/files/examples/watcher_rb.html +109 -0
- data/doc/files/lib/inotify/inotify_native_rb.html +109 -0
- data/doc/files/lib/inotify/version_rb.html +108 -0
- data/doc/files/lib/inotify_rb.html +108 -0
- data/doc/files/tests/test_1_rb.html +109 -0
- data/doc/fr_class_index.html +28 -0
- data/doc/fr_file_index.html +27 -0
- data/doc/fr_method_index.html +34 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/inotify/inotify_native.rb +103 -23
- data/ruby-inotify.gemspec +1 -1
- metadata +47 -4
- data/lib/inotify/version.rb +0 -3
@@ -0,0 +1,476 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Inotify</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Inotify</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/inotify/inotify_native_rb.html">
|
59
|
+
lib/inotify/inotify_native.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
The <a href="Inotify.html">Inotify</a> class is a simple wrapper around the
|
84
|
+
inotify functionality provided by the OS
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000001">add_watch</a>
|
97
|
+
<a href="#M000003">close</a>
|
98
|
+
<a href="#M000004">each_event</a>
|
99
|
+
<a href="#M000002">rm_watch</a>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if includes -->
|
107
|
+
|
108
|
+
<div id="section">
|
109
|
+
|
110
|
+
<div id="class-list">
|
111
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
112
|
+
|
113
|
+
Class <a href="Inotify/Event.html" class="link">Inotify::Event</a><br />
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div id="constants-list">
|
118
|
+
<h3 class="section-bar">Constants</h3>
|
119
|
+
|
120
|
+
<div class="name-list">
|
121
|
+
<table summary="Constants">
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">ACCESS</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">0x00000001</td>
|
126
|
+
<td width="3em"> </td>
|
127
|
+
<td class="context-item-desc">
|
128
|
+
File was accessed (read) (*)
|
129
|
+
|
130
|
+
</td>
|
131
|
+
</tr>
|
132
|
+
<tr class="top-aligned-row context-row">
|
133
|
+
<td class="context-item-name">MODIFY</td>
|
134
|
+
<td>=</td>
|
135
|
+
<td class="context-item-value">0x00000002</td>
|
136
|
+
<td width="3em"> </td>
|
137
|
+
<td class="context-item-desc">
|
138
|
+
File was modified (*)
|
139
|
+
|
140
|
+
</td>
|
141
|
+
</tr>
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">ATTRIB</td>
|
144
|
+
<td>=</td>
|
145
|
+
<td class="context-item-value">0x00000004</td>
|
146
|
+
<td width="3em"> </td>
|
147
|
+
<td class="context-item-desc">
|
148
|
+
Metadata changed, e.g., permissions, timestamps, extended attributes, link
|
149
|
+
count (since Linux 2.6.25), UID, GID, etc. (*)
|
150
|
+
|
151
|
+
</td>
|
152
|
+
</tr>
|
153
|
+
<tr class="top-aligned-row context-row">
|
154
|
+
<td class="context-item-name">CLOSE_WRITE</td>
|
155
|
+
<td>=</td>
|
156
|
+
<td class="context-item-value">0x00000008</td>
|
157
|
+
<td width="3em"> </td>
|
158
|
+
<td class="context-item-desc">
|
159
|
+
File opened for writing was closed (*)
|
160
|
+
|
161
|
+
</td>
|
162
|
+
</tr>
|
163
|
+
<tr class="top-aligned-row context-row">
|
164
|
+
<td class="context-item-name">CLOSE_NOWRITE</td>
|
165
|
+
<td>=</td>
|
166
|
+
<td class="context-item-value">0x00000010</td>
|
167
|
+
<td width="3em"> </td>
|
168
|
+
<td class="context-item-desc">
|
169
|
+
File not opened for writing was closed (*)
|
170
|
+
|
171
|
+
</td>
|
172
|
+
</tr>
|
173
|
+
<tr class="top-aligned-row context-row">
|
174
|
+
<td class="context-item-name">OPEN</td>
|
175
|
+
<td>=</td>
|
176
|
+
<td class="context-item-value">0x00000020</td>
|
177
|
+
<td width="3em"> </td>
|
178
|
+
<td class="context-item-desc">
|
179
|
+
File was opened (*)
|
180
|
+
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
<tr class="top-aligned-row context-row">
|
184
|
+
<td class="context-item-name">MOVED_FROM</td>
|
185
|
+
<td>=</td>
|
186
|
+
<td class="context-item-value">0x00000040</td>
|
187
|
+
<td width="3em"> </td>
|
188
|
+
<td class="context-item-desc">
|
189
|
+
File moved out of watched directory (*)
|
190
|
+
|
191
|
+
</td>
|
192
|
+
</tr>
|
193
|
+
<tr class="top-aligned-row context-row">
|
194
|
+
<td class="context-item-name">MOVED_TO</td>
|
195
|
+
<td>=</td>
|
196
|
+
<td class="context-item-value">0x00000080</td>
|
197
|
+
<td width="3em"> </td>
|
198
|
+
<td class="context-item-desc">
|
199
|
+
File moved into watched directory (*)
|
200
|
+
|
201
|
+
</td>
|
202
|
+
</tr>
|
203
|
+
<tr class="top-aligned-row context-row">
|
204
|
+
<td class="context-item-name">CREATE</td>
|
205
|
+
<td>=</td>
|
206
|
+
<td class="context-item-value">0x00000100</td>
|
207
|
+
<td width="3em"> </td>
|
208
|
+
<td class="context-item-desc">
|
209
|
+
File/directory created in watched directory (*)
|
210
|
+
|
211
|
+
</td>
|
212
|
+
</tr>
|
213
|
+
<tr class="top-aligned-row context-row">
|
214
|
+
<td class="context-item-name">DELETE</td>
|
215
|
+
<td>=</td>
|
216
|
+
<td class="context-item-value">0x00000200</td>
|
217
|
+
<td width="3em"> </td>
|
218
|
+
<td class="context-item-desc">
|
219
|
+
File/directory deleted from watched directory (*)
|
220
|
+
|
221
|
+
</td>
|
222
|
+
</tr>
|
223
|
+
<tr class="top-aligned-row context-row">
|
224
|
+
<td class="context-item-name">DELETE_SELF</td>
|
225
|
+
<td>=</td>
|
226
|
+
<td class="context-item-value">0x00000400</td>
|
227
|
+
<td width="3em"> </td>
|
228
|
+
<td class="context-item-desc">
|
229
|
+
Watched file/directory was itself deleted
|
230
|
+
|
231
|
+
</td>
|
232
|
+
</tr>
|
233
|
+
<tr class="top-aligned-row context-row">
|
234
|
+
<td class="context-item-name">MOVE_SELF</td>
|
235
|
+
<td>=</td>
|
236
|
+
<td class="context-item-value">0x00000800</td>
|
237
|
+
<td width="3em"> </td>
|
238
|
+
<td class="context-item-desc">
|
239
|
+
Watched file/directory was itself moved
|
240
|
+
|
241
|
+
</td>
|
242
|
+
</tr>
|
243
|
+
<tr class="top-aligned-row context-row">
|
244
|
+
<td class="context-item-name">UNMOUNT</td>
|
245
|
+
<td>=</td>
|
246
|
+
<td class="context-item-value">0x00002000</td>
|
247
|
+
<td width="3em"> </td>
|
248
|
+
<td class="context-item-desc">
|
249
|
+
File system containing watched object was unmounted
|
250
|
+
|
251
|
+
</td>
|
252
|
+
</tr>
|
253
|
+
<tr class="top-aligned-row context-row">
|
254
|
+
<td class="context-item-name">Q_OVERFLOW</td>
|
255
|
+
<td>=</td>
|
256
|
+
<td class="context-item-value">0x00004000</td>
|
257
|
+
<td width="3em"> </td>
|
258
|
+
<td class="context-item-desc">
|
259
|
+
<a href="Inotify/Event.html">Event</a> queue overflowed (wd is -1 for this
|
260
|
+
event)
|
261
|
+
|
262
|
+
</td>
|
263
|
+
</tr>
|
264
|
+
<tr class="top-aligned-row context-row">
|
265
|
+
<td class="context-item-name">IGNORED</td>
|
266
|
+
<td>=</td>
|
267
|
+
<td class="context-item-value">0x00008000</td>
|
268
|
+
<td width="3em"> </td>
|
269
|
+
<td class="context-item-desc">
|
270
|
+
Watch was removed explicitly (inotify_rm_watch(2)) or automatically (file
|
271
|
+
was deleted, or file system was unmounted)
|
272
|
+
|
273
|
+
</td>
|
274
|
+
</tr>
|
275
|
+
<tr class="top-aligned-row context-row">
|
276
|
+
<td class="context-item-name">ONLYDIR</td>
|
277
|
+
<td>=</td>
|
278
|
+
<td class="context-item-value">0x01000000</td>
|
279
|
+
<td width="3em"> </td>
|
280
|
+
<td class="context-item-desc">
|
281
|
+
(since Linux 2.6.15) Only watch pathname if it is a directory
|
282
|
+
|
283
|
+
</td>
|
284
|
+
</tr>
|
285
|
+
<tr class="top-aligned-row context-row">
|
286
|
+
<td class="context-item-name">DONT_FOLLOW</td>
|
287
|
+
<td>=</td>
|
288
|
+
<td class="context-item-value">0x02000000</td>
|
289
|
+
<td width="3em"> </td>
|
290
|
+
<td class="context-item-desc">
|
291
|
+
(since Linux 2.6.15) Don‘t dereference pathname if it is a symbolic
|
292
|
+
link
|
293
|
+
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
<tr class="top-aligned-row context-row">
|
297
|
+
<td class="context-item-name">EXCL_UNLINK</td>
|
298
|
+
<td>=</td>
|
299
|
+
<td class="context-item-value">0x04000000</td>
|
300
|
+
<td width="3em"> </td>
|
301
|
+
<td class="context-item-desc">
|
302
|
+
(since Linux 2.6.36) By default, when watching events on the children of a
|
303
|
+
directory, events are generated for children even after they have been
|
304
|
+
unlinked from the directory. This can result in large numbers of
|
305
|
+
uninteresting events for some applications (e.g., if watching /tmp, in
|
306
|
+
which many applications create temporary files whose names are immediately
|
307
|
+
unlinked). Specifying IN_EXCL_UNLINK changes the default behavior, so that
|
308
|
+
events are not generated for children after they have been unlinked from
|
309
|
+
the watched directory.
|
310
|
+
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
<tr class="top-aligned-row context-row">
|
314
|
+
<td class="context-item-name">MASK_ADD</td>
|
315
|
+
<td>=</td>
|
316
|
+
<td class="context-item-value">0x20000000</td>
|
317
|
+
<td width="3em"> </td>
|
318
|
+
<td class="context-item-desc">
|
319
|
+
Add (OR) events to watch mask for this pathname if it already exists
|
320
|
+
(instead of replacing mask)
|
321
|
+
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
<tr class="top-aligned-row context-row">
|
325
|
+
<td class="context-item-name">ISDIR</td>
|
326
|
+
<td>=</td>
|
327
|
+
<td class="context-item-value">0x40000000</td>
|
328
|
+
<td width="3em"> </td>
|
329
|
+
<td class="context-item-desc">
|
330
|
+
Subject of this event is a directory
|
331
|
+
|
332
|
+
</td>
|
333
|
+
</tr>
|
334
|
+
<tr class="top-aligned-row context-row">
|
335
|
+
<td class="context-item-name">ONESHOT</td>
|
336
|
+
<td>=</td>
|
337
|
+
<td class="context-item-value">0x80000000</td>
|
338
|
+
<td width="3em"> </td>
|
339
|
+
<td class="context-item-desc">
|
340
|
+
Monitor pathname for one event, then remove from watch list
|
341
|
+
|
342
|
+
</td>
|
343
|
+
</tr>
|
344
|
+
<tr class="top-aligned-row context-row">
|
345
|
+
<td class="context-item-name">CLOSE</td>
|
346
|
+
<td>=</td>
|
347
|
+
<td class="context-item-value">(CLOSE_WRITE | CLOSE_NOWRITE)</td>
|
348
|
+
<td width="3em"> </td>
|
349
|
+
<td class="context-item-desc">
|
350
|
+
Both of the <a href="Inotify.html#M000003">close</a> events
|
351
|
+
|
352
|
+
</td>
|
353
|
+
</tr>
|
354
|
+
<tr class="top-aligned-row context-row">
|
355
|
+
<td class="context-item-name">MOVE</td>
|
356
|
+
<td>=</td>
|
357
|
+
<td class="context-item-value">(MOVED_FROM | MOVED_TO)</td>
|
358
|
+
<td width="3em"> </td>
|
359
|
+
<td class="context-item-desc">
|
360
|
+
Both of the move events
|
361
|
+
|
362
|
+
</td>
|
363
|
+
</tr>
|
364
|
+
<tr class="top-aligned-row context-row">
|
365
|
+
<td class="context-item-name">ALL_EVENTS</td>
|
366
|
+
<td>=</td>
|
367
|
+
<td class="context-item-value">(ACCESS | MODIFY | ATTRIB | CLOSE_WRITE | \ CLOSE_NOWRITE | OPEN | MOVED_FROM | \ MOVED_TO | CREATE | DELETE | DELETE_SELF | MOVE_SELF)</td>
|
368
|
+
<td width="3em"> </td>
|
369
|
+
<td class="context-item-desc">
|
370
|
+
All of the events
|
371
|
+
|
372
|
+
</td>
|
373
|
+
</tr>
|
374
|
+
</table>
|
375
|
+
</div>
|
376
|
+
</div>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
<!-- if method_list -->
|
384
|
+
<div id="methods">
|
385
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
386
|
+
|
387
|
+
<div id="method-M000001" class="method-detail">
|
388
|
+
<a name="M000001"></a>
|
389
|
+
|
390
|
+
<div class="method-heading">
|
391
|
+
<a href="Inotify.src/M000001.html" target="Code" class="method-signature"
|
392
|
+
onclick="popupCode('Inotify.src/M000001.html');return false;">
|
393
|
+
<span class="method-name">add_watch</span><span class="method-args">(pathname, mask)</span>
|
394
|
+
</a>
|
395
|
+
</div>
|
396
|
+
|
397
|
+
<div class="method-description">
|
398
|
+
<p>
|
399
|
+
<a href="Inotify.html#M000001">add_watch</a>() adds a new watch, or
|
400
|
+
modifies an existing watch, for the file whose location is specified in
|
401
|
+
pathname; the caller must have read permission for this file. The events to
|
402
|
+
be monitored for pathname are specified in the mask bit-mask argument. On
|
403
|
+
success, inotify_add_watch() returns a nonnegative watch descriptor (wd),
|
404
|
+
or -1 if an error occurred.
|
405
|
+
</p>
|
406
|
+
</div>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
<div id="method-M000003" class="method-detail">
|
410
|
+
<a name="M000003"></a>
|
411
|
+
|
412
|
+
<div class="method-heading">
|
413
|
+
<a href="Inotify.src/M000003.html" target="Code" class="method-signature"
|
414
|
+
onclick="popupCode('Inotify.src/M000003.html');return false;">
|
415
|
+
<span class="method-name">close</span><span class="method-args">()</span>
|
416
|
+
</a>
|
417
|
+
</div>
|
418
|
+
|
419
|
+
<div class="method-description">
|
420
|
+
<p>
|
421
|
+
<a href="Inotify.html#M000003">close</a>() stops the processing of events
|
422
|
+
and closes the inotify instance in the OS
|
423
|
+
</p>
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
|
427
|
+
<div id="method-M000004" class="method-detail">
|
428
|
+
<a name="M000004"></a>
|
429
|
+
|
430
|
+
<div class="method-heading">
|
431
|
+
<a href="Inotify.src/M000004.html" target="Code" class="method-signature"
|
432
|
+
onclick="popupCode('Inotify.src/M000004.html');return false;">
|
433
|
+
<span class="method-name">each_event</span><span class="method-args">() {|event| ...}</span>
|
434
|
+
</a>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
<div class="method-description">
|
438
|
+
<p>
|
439
|
+
<a href="Inotify.html#M000004">each_event</a>() provides an easy way to
|
440
|
+
loop over all events as they occur
|
441
|
+
</p>
|
442
|
+
</div>
|
443
|
+
</div>
|
444
|
+
|
445
|
+
<div id="method-M000002" class="method-detail">
|
446
|
+
<a name="M000002"></a>
|
447
|
+
|
448
|
+
<div class="method-heading">
|
449
|
+
<a href="Inotify.src/M000002.html" target="Code" class="method-signature"
|
450
|
+
onclick="popupCode('Inotify.src/M000002.html');return false;">
|
451
|
+
<span class="method-name">rm_watch</span><span class="method-args">(wd)</span>
|
452
|
+
</a>
|
453
|
+
</div>
|
454
|
+
|
455
|
+
<div class="method-description">
|
456
|
+
<p>
|
457
|
+
<a href="Inotify.html#M000002">rm_watch</a>() removes the watch associated
|
458
|
+
with the watch descriptor wd. On success, returns zero, or -1 if an error
|
459
|
+
occurred.
|
460
|
+
</p>
|
461
|
+
</div>
|
462
|
+
</div>
|
463
|
+
|
464
|
+
|
465
|
+
</div>
|
466
|
+
|
467
|
+
|
468
|
+
</div>
|
469
|
+
|
470
|
+
|
471
|
+
<div id="validator-badges">
|
472
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
</body>
|
476
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_watch (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 99</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_watch</span>(<span class="ruby-identifier">pathname</span>, <span class="ruby-identifier">mask</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inotify_add_watch</span>(<span class="ruby-ivar">@fd</span>, <span class="ruby-identifier">pathname</span>, <span class="ruby-identifier">mask</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>rm_watch (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 105</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rm_watch</span>(<span class="ruby-identifier">wd</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inotify_rm_watch</span>(<span class="ruby-ivar">@fd</span>, <span class="ruby-identifier">wd</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>close (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 111</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inotify_close</span>(<span class="ruby-ivar">@fd</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>each_event (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 116</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_event</span>
|
15
|
+
<span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
16
|
+
<span class="ruby-identifier">ready</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">select</span>([<span class="ruby-ivar">@io</span>], <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
|
17
|
+
<span class="ruby-identifier">event</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_event</span>
|
18
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">event</span>
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>read_event (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 122</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_event</span>
|
15
|
+
<span class="ruby-identifier">buf</span> = <span class="ruby-constant">FFI</span><span class="ruby-operator">::</span><span class="ruby-constant">Buffer</span>.<span class="ruby-identifier">alloc_out</span>(<span class="ruby-constant">EventStruct</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-constant">MAX_NAME_SIZE</span>, <span class="ruby-value">1</span>, <span class="ruby-keyword kw">false</span>)
|
16
|
+
<span class="ruby-identifier">ev</span> = <span class="ruby-constant">EventStruct</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
|
17
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@fd</span>, <span class="ruby-identifier">buf</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">total</span>)
|
18
|
+
<span class="ruby-constant">Event</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ev</span>, <span class="ruby-identifier">buf</span>)
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>read_event (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 122</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_event</span>
|
15
|
+
<span class="ruby-identifier">buf</span> = <span class="ruby-constant">FFI</span><span class="ruby-operator">::</span><span class="ruby-constant">Buffer</span>.<span class="ruby-identifier">alloc_out</span>(<span class="ruby-constant">EventStruct</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">+</span> <span class="ruby-constant">MAX_NAME_SIZE</span>, <span class="ruby-value">1</span>, <span class="ruby-keyword kw">false</span>)
|
16
|
+
<span class="ruby-identifier">ev</span> = <span class="ruby-constant">EventStruct</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">buf</span>)
|
17
|
+
<span class="ruby-identifier">n</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read</span>(<span class="ruby-ivar">@fd</span>, <span class="ruby-identifier">buf</span>, <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">total</span>)
|
18
|
+
<span class="ruby-constant">Event</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ev</span>, <span class="ruby-identifier">buf</span>)
|
19
|
+
<span class="ruby-keyword kw">end</span></pre>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>new (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 60</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
15
|
+
<span class="ruby-ivar">@fd</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inotify_init</span>
|
16
|
+
<span class="ruby-ivar">@io</span> = <span class="ruby-constant">FFI</span><span class="ruby-operator">::</span><span class="ruby-constant">IO</span>.<span class="ruby-identifier">for_fd</span>(<span class="ruby-ivar">@fd</span>)
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<title>add_watch (Inotify)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/inotify/inotify_native.rb, line 64</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_watch</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">uint32</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inotify_add_watch</span>(<span class="ruby-ivar">@fd</span>, <span class="ruby-identifier">string</span>, <span class="ruby-identifier">uint32</span>)
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|