rumai 3.2.2 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CREDITS +27 -5
- data/bin/rumai +12 -37
- data/lib/rumai/inochi.rb +8 -17
- data/lib/rumai/irb.rb +21 -0
- data/man.html +914 -0
- data/man/man1/rumai.1.gz +0 -0
- metadata +19 -94
- data/HISTORY +0 -350
- data/INSTALL +0 -33
- data/MANUAL +0 -26
- data/README +0 -92
- data/USAGE +0 -297
- data/doc/ann.xml +0 -61
- data/doc/api/IO.html +0 -119
- data/doc/api/Integer.html +0 -171
- data/doc/api/Rumai.html +0 -1540
- data/doc/api/Rumai/Area.html +0 -1485
- data/doc/api/Rumai/Chain.html +0 -301
- data/doc/api/Rumai/Client.html +0 -2451
- data/doc/api/Rumai/ClientContainer.html +0 -301
- data/doc/api/Rumai/ExportInstanceMethods.html +0 -103
- data/doc/api/Rumai/IXP.html +0 -94
- data/doc/api/Rumai/IXP/Agent.html +0 -1625
- data/doc/api/Rumai/IXP/Agent/FidStream.html +0 -959
- data/doc/api/Rumai/IXP/Agent/RangedPool.html +0 -381
- data/doc/api/Rumai/IXP/Error.html +0 -110
- data/doc/api/Rumai/IXP/Fcall.html +0 -503
- data/doc/api/Rumai/IXP/Qid.html +0 -207
- data/doc/api/Rumai/IXP/Rattach.html +0 -148
- data/doc/api/Rumai/IXP/Rauth.html +0 -148
- data/doc/api/Rumai/IXP/Rclunk.html +0 -148
- data/doc/api/Rumai/IXP/Rcreate.html +0 -148
- data/doc/api/Rumai/IXP/Rerror.html +0 -148
- data/doc/api/Rumai/IXP/Rflush.html +0 -148
- data/doc/api/Rumai/IXP/Ropen.html +0 -148
- data/doc/api/Rumai/IXP/Rread.html +0 -148
- data/doc/api/Rumai/IXP/Rremove.html +0 -148
- data/doc/api/Rumai/IXP/Rstat.html +0 -148
- data/doc/api/Rumai/IXP/Rversion.html +0 -148
- data/doc/api/Rumai/IXP/Rwalk.html +0 -148
- data/doc/api/Rumai/IXP/Rwrite.html +0 -148
- data/doc/api/Rumai/IXP/Rwstat.html +0 -148
- data/doc/api/Rumai/IXP/Stat.html +0 -335
- data/doc/api/Rumai/IXP/Stream.html +0 -194
- data/doc/api/Rumai/IXP/Struct.html +0 -586
- data/doc/api/Rumai/IXP/Struct/ClassField.html +0 -242
- data/doc/api/Rumai/IXP/Struct/Field.html +0 -782
- data/doc/api/Rumai/IXP/Struct/Field/CounteeField.html +0 -227
- data/doc/api/Rumai/IXP/Struct/Field/CounterField.html +0 -153
- data/doc/api/Rumai/IXP/Struct/Integer8Field.html +0 -242
- data/doc/api/Rumai/IXP/Struct/StringField.html +0 -206
- data/doc/api/Rumai/IXP/Tattach.html +0 -148
- data/doc/api/Rumai/IXP/Tauth.html +0 -148
- data/doc/api/Rumai/IXP/Tclunk.html +0 -148
- data/doc/api/Rumai/IXP/Tcreate.html +0 -148
- data/doc/api/Rumai/IXP/Terror.html +0 -231
- data/doc/api/Rumai/IXP/Tflush.html +0 -148
- data/doc/api/Rumai/IXP/Topen.html +0 -240
- data/doc/api/Rumai/IXP/Tread.html +0 -148
- data/doc/api/Rumai/IXP/Tremove.html +0 -148
- data/doc/api/Rumai/IXP/Tstat.html +0 -148
- data/doc/api/Rumai/IXP/Tversion.html +0 -162
- data/doc/api/Rumai/IXP/Twalk.html +0 -148
- data/doc/api/Rumai/IXP/Twrite.html +0 -148
- data/doc/api/Rumai/IXP/Twstat.html +0 -148
- data/doc/api/Rumai/Node.html +0 -1406
- data/doc/api/Rumai/View.html +0 -1587
- data/doc/api/Rumai/WidgetImpl.html +0 -333
- data/doc/api/Rumai/WidgetNode.html +0 -246
- data/doc/api/String.html +0 -258
- data/doc/api/StringIO.html +0 -119
- data/doc/api/Time.html +0 -247
- data/doc/api/_index.html +0 -581
- data/doc/api/class_list.html +0 -36
- data/doc/api/css/common.css +0 -1
- data/doc/api/css/full_list.css +0 -50
- data/doc/api/css/style.css +0 -273
- data/doc/api/file.LICENSE.html +0 -73
- data/doc/api/file_list.html +0 -38
- data/doc/api/frames.html +0 -13
- data/doc/api/index.html +0 -73
- data/doc/api/js/app.js +0 -111
- data/doc/api/js/full_list.js +0 -117
- data/doc/api/js/jquery.js +0 -19
- data/doc/api/method_list.html +0 -1491
- data/doc/api/top-level-namespace.html +0 -89
- data/doc/index.html +0 -2655
- data/inochi.opts +0 -31
- data/test/rumai/ixp/message_test.rb +0 -245
- data/test/runner +0 -25
- data/test/test_helper.rb +0 -1
@@ -1,1625 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>Class: Rumai::IXP::Agent</title>
|
7
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '../..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<script type="text/javascript" charset="utf-8">
|
20
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<div id="header">
|
24
|
-
<div id="menu">
|
25
|
-
|
26
|
-
<a href="../../_index.html">Index (A)</a> »
|
27
|
-
<span class='title'><a href="../../Rumai.html" title="Rumai (module)">Rumai</a></span> » <span class='title'><a href="../IXP.html" title="Rumai::IXP (module)">IXP</a></span>
|
28
|
-
»
|
29
|
-
<span class="title">Agent</span>
|
30
|
-
|
31
|
-
|
32
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="search">
|
36
|
-
<a id="class_list_link" href="#">Class List</a>
|
37
|
-
<a id="method_list_link" href="#">Method List</a>
|
38
|
-
<a id ="file_list_link" href="#">File List</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div class="clear"></div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<iframe id="search_frame"></iframe>
|
45
|
-
|
46
|
-
<div id="content"><h1>Class: Rumai::IXP::Agent
|
47
|
-
|
48
|
-
|
49
|
-
</h1>
|
50
|
-
|
51
|
-
<dl class="box">
|
52
|
-
|
53
|
-
<dt class="r1">Inherits:</dt>
|
54
|
-
<dd class="r1">
|
55
|
-
<span class="inheritName"><a href="../../Object.html" title="Object (class)">Object</a></span>
|
56
|
-
|
57
|
-
<ul class="fullTree">
|
58
|
-
<li><a href="../../Object.html" title="Object (class)">Object</a></li>
|
59
|
-
|
60
|
-
<li class="next">Rumai::IXP::Agent</li>
|
61
|
-
|
62
|
-
</ul>
|
63
|
-
<a href="#" class="inheritanceTree">show all</a>
|
64
|
-
|
65
|
-
</dd>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
<dt class="r2 last">Defined in:</dt>
|
76
|
-
<dd class="r2 last">lib/rumai/ixp/transport.rb</dd>
|
77
|
-
|
78
|
-
</dl>
|
79
|
-
<div class="clear"></div>
|
80
|
-
|
81
|
-
<h2>Overview</h2><div class="docstring">
|
82
|
-
<div class="discussion">
|
83
|
-
<p>
|
84
|
-
A thread-safe channel that multiplexes many threads onto a single 9P2000
|
85
|
-
connection.
|
86
|
-
</p>
|
87
|
-
<p>
|
88
|
-
The send/recv implementation is based on the XCB cookie approach: <a
|
89
|
-
href="http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies">www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies</a>
|
90
|
-
</p>
|
91
|
-
|
92
|
-
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
<div class="tags">
|
96
|
-
|
97
|
-
</div><h2>Defined Under Namespace</h2>
|
98
|
-
<p class="children">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<strong class="classes">Classes:</strong> <a href="Agent/FidStream.html" title="Rumai::IXP::Agent::FidStream (class)">FidStream</a>, <a href="Agent/RangedPool.html" title="Rumai::IXP::Agent::RangedPool (class)">RangedPool</a>
|
104
|
-
|
105
|
-
|
106
|
-
</p>
|
107
|
-
|
108
|
-
<h2>Constant Summary</h2>
|
109
|
-
|
110
|
-
<dl class="constants">
|
111
|
-
|
112
|
-
<dt id="MODES-constant" class="">MODES =
|
113
|
-
|
114
|
-
</dt>
|
115
|
-
<dd><pre class="code"><span class='lbrace'>{</span>
|
116
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'>Topen</span><span class='op'>::</span><span class='const'>OREAD</span><span class='comma'>,</span>
|
117
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'>Topen</span><span class='op'>::</span><span class='const'>OWRITE</span><span class='comma'>,</span>
|
118
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>t</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'>Topen</span><span class='op'>::</span><span class='const'>ORCLOSE</span><span class='comma'>,</span>
|
119
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>+</span><span class='tstring_end'>'</span></span> <span class='op'>=></span> <span class='const'>Topen</span><span class='op'>::</span><span class='const'>ORDWR</span><span class='comma'>,</span>
|
120
|
-
<span class='rbrace'>}</span></pre></dd>
|
121
|
-
|
122
|
-
</dl>
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<h2>Instance Attribute Summary</h2>
|
127
|
-
<ul class="summary">
|
128
|
-
|
129
|
-
<li class="public ">
|
130
|
-
<span class="summary_signature">
|
131
|
-
|
132
|
-
<a href="#msize-instance_method" title="#msize (instance method)">- (Object) <strong>msize</strong> </a>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
</span>
|
137
|
-
|
138
|
-
|
139
|
-
<span class="note title readonly">readonly</span>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<span class="summary_desc"><div class='inline'><p>
|
148
|
-
Returns the value of attribute msize.
|
149
|
-
</p>
|
150
|
-
</div></span>
|
151
|
-
|
152
|
-
</li>
|
153
|
-
|
154
|
-
|
155
|
-
</ul>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<h2>Instance Method Summary</h2>
|
160
|
-
|
161
|
-
<ul class="summary">
|
162
|
-
|
163
|
-
<li class="public ">
|
164
|
-
<span class="summary_signature">
|
165
|
-
|
166
|
-
<a href="#attach-instance_method" title="#attach (instance method)">- (Object) <strong>attach</strong>(root_fid, auth_fid = Fcall::NOFID, auth_name = ENV['USER']) </a>
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
</span>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
<span class="summary_desc"><div class='inline'><p>
|
179
|
-
Associates the given FID with the FS root.
|
180
|
-
</p>
|
181
|
-
</div></span>
|
182
|
-
|
183
|
-
</li>
|
184
|
-
|
185
|
-
|
186
|
-
<li class="public ">
|
187
|
-
<span class="summary_signature">
|
188
|
-
|
189
|
-
<a href="#clunk-instance_method" title="#clunk (instance method)">- (Object) <strong>clunk</strong>(fid) </a>
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
</span>
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
<span class="summary_desc"><div class='inline'><p>
|
202
|
-
Retires the given FID from use.
|
203
|
-
</p>
|
204
|
-
</div></span>
|
205
|
-
|
206
|
-
</li>
|
207
|
-
|
208
|
-
|
209
|
-
<li class="public ">
|
210
|
-
<span class="summary_signature">
|
211
|
-
|
212
|
-
<a href="#create-instance_method" title="#create (instance method)">- (Object) <strong>create</strong>(path, mode = 'rw', perm = 0644) </a>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</span>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
<span class="summary_desc"><div class='inline'><p>
|
225
|
-
Creates a new file at the given path that is accessible using the given
|
226
|
-
modes for a user having the given permission bits.
|
227
|
-
</p>
|
228
|
-
</div></span>
|
229
|
-
|
230
|
-
</li>
|
231
|
-
|
232
|
-
|
233
|
-
<li class="public ">
|
234
|
-
<span class="summary_signature">
|
235
|
-
|
236
|
-
<a href="#entries-instance_method" title="#entries (instance method)">- (Object) <strong>entries</strong>(path) </a>
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
</span>
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
<span class="summary_desc"><div class='inline'><p>
|
249
|
-
Returns the basenames of all files inside the directory at the given path.
|
250
|
-
</p>
|
251
|
-
</div></span>
|
252
|
-
|
253
|
-
</li>
|
254
|
-
|
255
|
-
|
256
|
-
<li class="public ">
|
257
|
-
<span class="summary_signature">
|
258
|
-
|
259
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Agent) <strong>initialize</strong>(stream) </a>
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
</span>
|
264
|
-
|
265
|
-
<span class="note title constructor">constructor</span>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
<span class="summary_desc"><div class='inline'><p>
|
274
|
-
A new instance of Agent.
|
275
|
-
</p>
|
276
|
-
</div></span>
|
277
|
-
|
278
|
-
</li>
|
279
|
-
|
280
|
-
|
281
|
-
<li class="public ">
|
282
|
-
<span class="summary_signature">
|
283
|
-
|
284
|
-
<a href="#open-instance_method" title="#open (instance method)">- (Object) <strong>open</strong>(path, mode = 'r') </a>
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
</span>
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
<span class="summary_desc"><div class='inline'><p>
|
297
|
-
Opens the given path for I/O access through a <tt><a href="Agent/FidStream.html" title="Rumai::IXP::Agent::FidStream (class)">FidStream</a></tt> object.
|
298
|
-
</p>
|
299
|
-
</div></span>
|
300
|
-
|
301
|
-
</li>
|
302
|
-
|
303
|
-
|
304
|
-
<li class="public ">
|
305
|
-
<span class="summary_signature">
|
306
|
-
|
307
|
-
<a href="#read-instance_method" title="#read (instance method)">- (Object) <strong>read</strong>(path, *args) </a>
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
</span>
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
<span class="summary_desc"><div class='inline'><p>
|
320
|
-
Returns the content of the file/directory at the given path.
|
321
|
-
</p>
|
322
|
-
</div></span>
|
323
|
-
|
324
|
-
</li>
|
325
|
-
|
326
|
-
|
327
|
-
<li class="public ">
|
328
|
-
<span class="summary_signature">
|
329
|
-
|
330
|
-
<a href="#recv-instance_method" title="#recv (instance method)">- (Object) <strong>recv</strong>(tag) </a>
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
</span>
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
<span class="summary_desc"><div class='inline'><p>
|
343
|
-
Returns the reply for the given ticket, which was previously given to you
|
344
|
-
when you sent the corresponding request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt>.
|
345
|
-
</p>
|
346
|
-
</div></span>
|
347
|
-
|
348
|
-
</li>
|
349
|
-
|
350
|
-
|
351
|
-
<li class="public ">
|
352
|
-
<span class="summary_signature">
|
353
|
-
|
354
|
-
<a href="#remove-instance_method" title="#remove (instance method)">- (Object) <strong>remove</strong>(path) </a>
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
</span>
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
<span class="summary_desc"><div class='inline'><p>
|
367
|
-
Deletes the file at the given path.
|
368
|
-
</p>
|
369
|
-
</div></span>
|
370
|
-
|
371
|
-
</li>
|
372
|
-
|
373
|
-
|
374
|
-
<li class="public ">
|
375
|
-
<span class="summary_signature">
|
376
|
-
|
377
|
-
<a href="#remove_fid-instance_method" title="#remove_fid (instance method)">- (Object) <strong>remove_fid</strong>(path_fid) </a>
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
</span>
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
<span class="summary_desc"><div class='inline'><p>
|
390
|
-
Deletes the file corresponding to the given FID and clunks the given FID.
|
391
|
-
</p>
|
392
|
-
</div></span>
|
393
|
-
|
394
|
-
</li>
|
395
|
-
|
396
|
-
|
397
|
-
<li class="public ">
|
398
|
-
<span class="summary_signature">
|
399
|
-
|
400
|
-
<a href="#send-instance_method" title="#send (instance method)">- (Object) <strong>send</strong>(request) </a>
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
</span>
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
<span class="summary_desc"><div class='inline'><p>
|
413
|
-
Sends the given request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt> and returns a ticket that you
|
414
|
-
can use later to receive the reply.
|
415
|
-
</p>
|
416
|
-
</div></span>
|
417
|
-
|
418
|
-
</li>
|
419
|
-
|
420
|
-
|
421
|
-
<li class="public ">
|
422
|
-
<span class="summary_signature">
|
423
|
-
|
424
|
-
<a href="#stat-instance_method" title="#stat (instance method)">- (Object) <strong>stat</strong>(path) </a>
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
</span>
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
<span class="summary_desc"><div class='inline'><p>
|
437
|
-
Returns information about the file at the given path.
|
438
|
-
</p>
|
439
|
-
</div></span>
|
440
|
-
|
441
|
-
</li>
|
442
|
-
|
443
|
-
|
444
|
-
<li class="public ">
|
445
|
-
<span class="summary_signature">
|
446
|
-
|
447
|
-
<a href="#stat_fid-instance_method" title="#stat_fid (instance method)">- (Object) <strong>stat_fid</strong>(path_fid) </a>
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
</span>
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
<span class="summary_desc"><div class='inline'><p>
|
460
|
-
Returns information about the file referenced by the given FID.
|
461
|
-
</p>
|
462
|
-
</div></span>
|
463
|
-
|
464
|
-
</li>
|
465
|
-
|
466
|
-
|
467
|
-
<li class="public ">
|
468
|
-
<span class="summary_signature">
|
469
|
-
|
470
|
-
<a href="#talk-instance_method" title="#talk (instance method)">- (Object) <strong>talk</strong>(request) </a>
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
</span>
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
<span class="summary_desc"><div class='inline'><p>
|
483
|
-
Sends the given request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt> and returns its reply.
|
484
|
-
</p>
|
485
|
-
</div></span>
|
486
|
-
|
487
|
-
</li>
|
488
|
-
|
489
|
-
|
490
|
-
<li class="public ">
|
491
|
-
<span class="summary_signature">
|
492
|
-
|
493
|
-
<a href="#walk-instance_method" title="#walk (instance method)">- (Object) <strong>walk</strong>(path) </a>
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
</span>
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
<span class="summary_desc"><div class='inline'><p>
|
506
|
-
Returns an FID corresponding to the given path.
|
507
|
-
</p>
|
508
|
-
</div></span>
|
509
|
-
|
510
|
-
</li>
|
511
|
-
|
512
|
-
|
513
|
-
<li class="public ">
|
514
|
-
<span class="summary_signature">
|
515
|
-
|
516
|
-
<a href="#walk_fid-instance_method" title="#walk_fid (instance method)">- (Object) <strong>walk_fid</strong>(path_fid, path) </a>
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
</span>
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
<span class="summary_desc"><div class='inline'><p>
|
529
|
-
Associates the given FID to the given path.
|
530
|
-
</p>
|
531
|
-
</div></span>
|
532
|
-
|
533
|
-
</li>
|
534
|
-
|
535
|
-
|
536
|
-
<li class="public ">
|
537
|
-
<span class="summary_signature">
|
538
|
-
|
539
|
-
<a href="#write-instance_method" title="#write (instance method)">- (Object) <strong>write</strong>(path, content) </a>
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
</span>
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
<span class="summary_desc"><div class='inline'><p>
|
552
|
-
Writes the given content to the file at the given path.
|
553
|
-
</p>
|
554
|
-
</div></span>
|
555
|
-
|
556
|
-
</li>
|
557
|
-
|
558
|
-
|
559
|
-
</ul>
|
560
|
-
|
561
|
-
|
562
|
-
<div id="constructor_details" class="method_details_list">
|
563
|
-
<h2>Constructor Details</h2>
|
564
|
-
|
565
|
-
<div class="method_details first">
|
566
|
-
<p class="signature first" id="initialize-instance_method">
|
567
|
-
|
568
|
-
- (<tt><a href="" title="Rumai::IXP::Agent (class)">Agent</a></tt>) <strong>initialize</strong>(stream)
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
</p><div class="docstring">
|
573
|
-
<div class="discussion">
|
574
|
-
<p>
|
575
|
-
A new instance of Agent
|
576
|
-
</p>
|
577
|
-
|
578
|
-
|
579
|
-
</div>
|
580
|
-
</div>
|
581
|
-
<div class="tags">
|
582
|
-
<h3>Parameters:</h3>
|
583
|
-
<ul class="param">
|
584
|
-
|
585
|
-
<li>
|
586
|
-
|
587
|
-
<span class='type'></span>
|
588
|
-
|
589
|
-
|
590
|
-
<span class='name'>stream</span>
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
—
|
595
|
-
<div class='inline'><p>
|
596
|
-
I/O stream on which a 9P2000 server is listening.
|
597
|
-
</p>
|
598
|
-
</div>
|
599
|
-
|
600
|
-
</li>
|
601
|
-
|
602
|
-
</ul>
|
603
|
-
|
604
|
-
</div><table class="source_code">
|
605
|
-
<tr>
|
606
|
-
<td>
|
607
|
-
<pre class="lines">
|
608
|
-
|
609
|
-
|
610
|
-
22
|
611
|
-
23
|
612
|
-
24
|
613
|
-
25
|
614
|
-
26
|
615
|
-
27
|
616
|
-
28
|
617
|
-
29
|
618
|
-
30
|
619
|
-
31
|
620
|
-
32
|
621
|
-
33
|
622
|
-
34
|
623
|
-
35
|
624
|
-
36
|
625
|
-
37
|
626
|
-
38
|
627
|
-
39
|
628
|
-
40
|
629
|
-
41
|
630
|
-
42
|
631
|
-
43
|
632
|
-
44
|
633
|
-
45
|
634
|
-
46
|
635
|
-
47
|
636
|
-
48
|
637
|
-
49
|
638
|
-
50
|
639
|
-
51</pre>
|
640
|
-
</td>
|
641
|
-
<td>
|
642
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 22</span>
|
643
|
-
|
644
|
-
<span class='kw'>def</span> <span class='id initialize'>initialize</span> <span class='id stream'>stream</span>
|
645
|
-
<span class='ivar'>@stream</span> <span class='op'>=</span> <span class='id stream'>stream</span>
|
646
|
-
|
647
|
-
<span class='ivar'>@recv_buf</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='comment'># tag => message
|
648
|
-
</span> <span class='ivar'>@recv_lock</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id new'>new</span>
|
649
|
-
|
650
|
-
<span class='ivar'>@tag_pool</span> <span class='op'>=</span> <span class='const'>RangedPool</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='int'>0</span><span class='op'>...</span><span class='const'>BYTE2_MASK</span><span class='rparen'>)</span>
|
651
|
-
<span class='ivar'>@fid_pool</span> <span class='op'>=</span> <span class='const'>RangedPool</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='int'>0</span><span class='op'>...</span><span class='const'>BYTE4_MASK</span><span class='rparen'>)</span>
|
652
|
-
|
653
|
-
<span class='comment'># establish connection with 9P2000 server
|
654
|
-
</span> <span class='id req'>req</span> <span class='op'>=</span> <span class='const'>Tversion</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span>
|
655
|
-
<span class='symbol'>:tag</span> <span class='op'>=></span> <span class='const'>Fcall</span><span class='op'>::</span><span class='const'>NOTAG</span><span class='comma'>,</span>
|
656
|
-
<span class='symbol'>:msize</span> <span class='op'>=></span> <span class='const'>Tversion</span><span class='op'>::</span><span class='const'>MSIZE</span><span class='comma'>,</span>
|
657
|
-
<span class='symbol'>:version</span> <span class='op'>=></span> <span class='const'>Tversion</span><span class='op'>::</span><span class='const'>VERSION</span>
|
658
|
-
<span class='rparen'>)</span>
|
659
|
-
<span class='id rsp'>rsp</span> <span class='op'>=</span> <span class='id talk'>talk</span><span class='lparen'>(</span><span class='id req'>req</span><span class='rparen'>)</span>
|
660
|
-
|
661
|
-
<span class='kw'>unless</span> <span class='id req'>req</span><span class='period'>.</span><span class='id version'>version</span> <span class='op'>==</span> <span class='id rsp'>rsp</span><span class='period'>.</span><span class='id version'>version</span>
|
662
|
-
<span class='id raise'>raise</span> <span class='const'>Error</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>protocol mismatch: self=</span><span class='embexpr_beg'>#{</span><span class='id req'>req</span><span class='period'>.</span><span class='id version'>version</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> server=</span><span class='embexpr_beg'>#{</span><span class='id rsp'>rsp</span><span class='period'>.</span><span class='id version'>version</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
663
|
-
<span class='kw'>end</span>
|
664
|
-
|
665
|
-
<span class='ivar'>@msize</span> <span class='op'>=</span> <span class='id rsp'>rsp</span><span class='period'>.</span><span class='id msize'>msize</span>
|
666
|
-
|
667
|
-
<span class='comment'># authenticate the connection (not necessary for wmii)
|
668
|
-
</span> <span class='ivar'>@auth_fid</span> <span class='op'>=</span> <span class='const'>Fcall</span><span class='op'>::</span><span class='const'>NOFID</span>
|
669
|
-
|
670
|
-
<span class='comment'># attach to filesystem root
|
671
|
-
</span> <span class='ivar'>@root_fid</span> <span class='op'>=</span> <span class='ivar'>@fid_pool</span><span class='period'>.</span><span class='id obtain'>obtain</span>
|
672
|
-
<span class='id attach'>attach</span> <span class='ivar'>@root_fid</span><span class='comma'>,</span> <span class='ivar'>@auth_fid</span>
|
673
|
-
<span class='kw'>end</span></pre>
|
674
|
-
</td>
|
675
|
-
</tr>
|
676
|
-
</table>
|
677
|
-
</div>
|
678
|
-
|
679
|
-
</div>
|
680
|
-
|
681
|
-
<div id="instance_attr_details" class="attr_details">
|
682
|
-
<h2>Instance Attribute Details</h2>
|
683
|
-
|
684
|
-
|
685
|
-
<span id=""></span>
|
686
|
-
<span id="msize-instance_method"></span>
|
687
|
-
<div class="method_details first">
|
688
|
-
<p class="signature first" id="msize-instance_method">
|
689
|
-
|
690
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>msize</strong> <span class="extras">(readonly)</span>
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
</p><div class="docstring">
|
695
|
-
<div class="discussion">
|
696
|
-
<p>
|
697
|
-
Returns the value of attribute msize
|
698
|
-
</p>
|
699
|
-
|
700
|
-
|
701
|
-
</div>
|
702
|
-
</div>
|
703
|
-
<div class="tags">
|
704
|
-
|
705
|
-
</div><table class="source_code">
|
706
|
-
<tr>
|
707
|
-
<td>
|
708
|
-
<pre class="lines">
|
709
|
-
|
710
|
-
|
711
|
-
16
|
712
|
-
17
|
713
|
-
18</pre>
|
714
|
-
</td>
|
715
|
-
<td>
|
716
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 16</span>
|
717
|
-
|
718
|
-
<span class='kw'>def</span> <span class='id msize'>msize</span>
|
719
|
-
<span class='ivar'>@msize</span>
|
720
|
-
<span class='kw'>end</span></pre>
|
721
|
-
</td>
|
722
|
-
</tr>
|
723
|
-
</table>
|
724
|
-
</div>
|
725
|
-
|
726
|
-
</div>
|
727
|
-
|
728
|
-
|
729
|
-
<div id="instance_method_details" class="method_details_list">
|
730
|
-
<h2>Instance Method Details</h2>
|
731
|
-
|
732
|
-
|
733
|
-
<div class="method_details first">
|
734
|
-
<p class="signature first" id="attach-instance_method">
|
735
|
-
|
736
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>attach</strong>(root_fid, auth_fid = Fcall::NOFID, auth_name = ENV['USER'])
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
</p><div class="docstring">
|
741
|
-
<div class="discussion">
|
742
|
-
<p>
|
743
|
-
Associates the given FID with the FS root.
|
744
|
-
</p>
|
745
|
-
|
746
|
-
|
747
|
-
</div>
|
748
|
-
</div>
|
749
|
-
<div class="tags">
|
750
|
-
|
751
|
-
</div><table class="source_code">
|
752
|
-
<tr>
|
753
|
-
<td>
|
754
|
-
<pre class="lines">
|
755
|
-
|
756
|
-
|
757
|
-
468
|
758
|
-
469
|
759
|
-
470
|
760
|
-
471
|
761
|
-
472
|
762
|
-
473
|
763
|
-
474
|
764
|
-
475</pre>
|
765
|
-
</td>
|
766
|
-
<td>
|
767
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 468</span>
|
768
|
-
|
769
|
-
<span class='kw'>def</span> <span class='id attach'>attach</span> <span class='id root_fid'>root_fid</span><span class='comma'>,</span> <span class='id auth_fid'>auth_fid</span> <span class='op'>=</span> <span class='const'>Fcall</span><span class='op'>::</span><span class='const'>NOFID</span><span class='comma'>,</span> <span class='id auth_name'>auth_name</span> <span class='op'>=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>USER</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
770
|
-
<span class='id talk'>talk</span> <span class='const'>Tattach</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span>
|
771
|
-
<span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id root_fid'>root_fid</span><span class='comma'>,</span>
|
772
|
-
<span class='symbol'>:afid</span> <span class='op'>=></span> <span class='id auth_fid'>auth_fid</span><span class='comma'>,</span>
|
773
|
-
<span class='symbol'>:uname</span> <span class='op'>=></span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>USER</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
774
|
-
<span class='symbol'>:aname</span> <span class='op'>=></span> <span class='id auth_name'>auth_name</span>
|
775
|
-
<span class='rparen'>)</span>
|
776
|
-
<span class='kw'>end</span></pre>
|
777
|
-
</td>
|
778
|
-
</tr>
|
779
|
-
</table>
|
780
|
-
</div>
|
781
|
-
|
782
|
-
<div class="method_details ">
|
783
|
-
<p class="signature " id="clunk-instance_method">
|
784
|
-
|
785
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>clunk</strong>(fid)
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
</p><div class="docstring">
|
790
|
-
<div class="discussion">
|
791
|
-
<p>
|
792
|
-
Retires the given FID from use.
|
793
|
-
</p>
|
794
|
-
|
795
|
-
|
796
|
-
</div>
|
797
|
-
</div>
|
798
|
-
<div class="tags">
|
799
|
-
|
800
|
-
</div><table class="source_code">
|
801
|
-
<tr>
|
802
|
-
<td>
|
803
|
-
<pre class="lines">
|
804
|
-
|
805
|
-
|
806
|
-
480
|
807
|
-
481
|
808
|
-
482
|
809
|
-
483</pre>
|
810
|
-
</td>
|
811
|
-
<td>
|
812
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 480</span>
|
813
|
-
|
814
|
-
<span class='kw'>def</span> <span class='id clunk'>clunk</span> <span class='id fid'>fid</span>
|
815
|
-
<span class='id talk'>talk</span> <span class='const'>Tclunk</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id fid'>fid</span><span class='rparen'>)</span>
|
816
|
-
<span class='ivar'>@fid_pool</span><span class='period'>.</span><span class='id release'>release</span> <span class='id fid'>fid</span>
|
817
|
-
<span class='kw'>end</span></pre>
|
818
|
-
</td>
|
819
|
-
</tr>
|
820
|
-
</table>
|
821
|
-
</div>
|
822
|
-
|
823
|
-
<div class="method_details ">
|
824
|
-
<p class="signature " id="create-instance_method">
|
825
|
-
|
826
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>create</strong>(path, mode = 'rw', perm = 0644)
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
</p><div class="docstring">
|
831
|
-
<div class="discussion">
|
832
|
-
<p>
|
833
|
-
Creates a new file at the given path that is accessible using the given
|
834
|
-
modes for a user having the given permission bits.
|
835
|
-
</p>
|
836
|
-
|
837
|
-
|
838
|
-
</div>
|
839
|
-
</div>
|
840
|
-
<div class="tags">
|
841
|
-
|
842
|
-
</div><table class="source_code">
|
843
|
-
<tr>
|
844
|
-
<td>
|
845
|
-
<pre class="lines">
|
846
|
-
|
847
|
-
|
848
|
-
391
|
849
|
-
392
|
850
|
-
393
|
851
|
-
394
|
852
|
-
395
|
853
|
-
396
|
854
|
-
397
|
855
|
-
398
|
856
|
-
399
|
857
|
-
400
|
858
|
-
401
|
859
|
-
402
|
860
|
-
403
|
861
|
-
404
|
862
|
-
405
|
863
|
-
406
|
864
|
-
407
|
865
|
-
408</pre>
|
866
|
-
</td>
|
867
|
-
<td>
|
868
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 391</span>
|
869
|
-
|
870
|
-
<span class='kw'>def</span> <span class='id create'>create</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id mode'>mode</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rw</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id perm'>perm</span> <span class='op'>=</span> <span class='int'>0644</span>
|
871
|
-
<span class='id prefix'>prefix</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id dirname'>dirname</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
872
|
-
<span class='id target'>target</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id basename'>basename</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
873
|
-
|
874
|
-
<span class='id mode'>mode</span> <span class='op'>=</span> <span class='const'>MODES</span><span class='period'>.</span><span class='id parse'>parse</span><span class='lparen'>(</span><span class='id mode'>mode</span><span class='rparen'>)</span>
|
875
|
-
|
876
|
-
<span class='id with_fid'>with_fid</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id prefix_fid'>prefix_fid</span><span class='op'>|</span>
|
877
|
-
<span class='id walk_fid'>walk_fid</span> <span class='id prefix_fid'>prefix_fid</span><span class='comma'>,</span> <span class='id prefix'>prefix</span>
|
878
|
-
|
879
|
-
<span class='comment'># create the file
|
880
|
-
</span> <span class='id talk'>talk</span> <span class='const'>Tcreate</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span>
|
881
|
-
<span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id prefix_fid'>prefix_fid</span><span class='comma'>,</span>
|
882
|
-
<span class='symbol'>:name</span> <span class='op'>=></span> <span class='id target'>target</span><span class='comma'>,</span>
|
883
|
-
<span class='symbol'>:perm</span> <span class='op'>=></span> <span class='id perm'>perm</span><span class='comma'>,</span>
|
884
|
-
<span class='symbol'>:mode</span> <span class='op'>=></span> <span class='id mode'>mode</span>
|
885
|
-
<span class='rparen'>)</span>
|
886
|
-
<span class='kw'>end</span>
|
887
|
-
<span class='kw'>end</span></pre>
|
888
|
-
</td>
|
889
|
-
</tr>
|
890
|
-
</table>
|
891
|
-
</div>
|
892
|
-
|
893
|
-
<div class="method_details ">
|
894
|
-
<p class="signature " id="entries-instance_method">
|
895
|
-
|
896
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>entries</strong>(path)
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
</p><div class="docstring">
|
901
|
-
<div class="discussion">
|
902
|
-
<p>
|
903
|
-
Returns the basenames of all files inside the directory at the given path.
|
904
|
-
</p>
|
905
|
-
|
906
|
-
|
907
|
-
</div>
|
908
|
-
</div>
|
909
|
-
<div class="tags">
|
910
|
-
|
911
|
-
<h3>See Also:</h3>
|
912
|
-
<ul class="see">
|
913
|
-
|
914
|
-
<li>Dir::entries</li>
|
915
|
-
|
916
|
-
</ul>
|
917
|
-
|
918
|
-
</div><table class="source_code">
|
919
|
-
<tr>
|
920
|
-
<td>
|
921
|
-
<pre class="lines">
|
922
|
-
|
923
|
-
|
924
|
-
369
|
925
|
-
370
|
926
|
-
371
|
927
|
-
372
|
928
|
-
373
|
929
|
-
374
|
930
|
-
375</pre>
|
931
|
-
</td>
|
932
|
-
<td>
|
933
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 369</span>
|
934
|
-
|
935
|
-
<span class='kw'>def</span> <span class='id entries'>entries</span> <span class='id path'>path</span>
|
936
|
-
<span class='kw'>unless</span> <span class='id stat'>stat</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id directory?'>directory?</span>
|
937
|
-
<span class='id raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id path'>path</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> is not a directory</span><span class='tstring_end'>"</span></span>
|
938
|
-
<span class='kw'>end</span>
|
939
|
-
|
940
|
-
<span class='id read'>read</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id map!'>map!</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id t'>t</span><span class='op'>|</span> <span class='id t'>t</span><span class='period'>.</span><span class='id name'>name</span><span class='rbrace'>}</span>
|
941
|
-
<span class='kw'>end</span></pre>
|
942
|
-
</td>
|
943
|
-
</tr>
|
944
|
-
</table>
|
945
|
-
</div>
|
946
|
-
|
947
|
-
<div class="method_details ">
|
948
|
-
<p class="signature " id="open-instance_method">
|
949
|
-
|
950
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>open</strong>(path, mode = 'r')
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
</p><div class="docstring">
|
955
|
-
<div class="discussion">
|
956
|
-
<p>
|
957
|
-
Opens the given path for I/O access through a <tt><a href="Agent/FidStream.html" title="Rumai::IXP::Agent::FidStream (class)">FidStream</a></tt> object. If a
|
958
|
-
block is given, it is invoked with a <tt><a href="Agent/FidStream.html" title="Rumai::IXP::Agent::FidStream (class)">FidStream</a></tt> object and the stream is
|
959
|
-
closed afterwards.
|
960
|
-
</p>
|
961
|
-
|
962
|
-
|
963
|
-
</div>
|
964
|
-
</div>
|
965
|
-
<div class="tags">
|
966
|
-
|
967
|
-
<h3>See Also:</h3>
|
968
|
-
<ul class="see">
|
969
|
-
|
970
|
-
<li>File::open</li>
|
971
|
-
|
972
|
-
</ul>
|
973
|
-
|
974
|
-
</div><table class="source_code">
|
975
|
-
<tr>
|
976
|
-
<td>
|
977
|
-
<pre class="lines">
|
978
|
-
|
979
|
-
|
980
|
-
208
|
981
|
-
209
|
982
|
-
210
|
983
|
-
211
|
984
|
-
212
|
985
|
-
213
|
986
|
-
214
|
987
|
-
215
|
988
|
-
216
|
989
|
-
217
|
990
|
-
218
|
991
|
-
219
|
992
|
-
220
|
993
|
-
221
|
994
|
-
222
|
995
|
-
223
|
996
|
-
224
|
997
|
-
225
|
998
|
-
226
|
999
|
-
227
|
1000
|
-
228
|
1001
|
-
229
|
1002
|
-
230
|
1003
|
-
231</pre>
|
1004
|
-
</td>
|
1005
|
-
<td>
|
1006
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 208</span>
|
1007
|
-
|
1008
|
-
<span class='kw'>def</span> <span class='id open'>open</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id mode'>mode</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span>
|
1009
|
-
<span class='id mode'>mode</span> <span class='op'>=</span> <span class='const'>MODES</span><span class='period'>.</span><span class='id parse'>parse</span><span class='lparen'>(</span><span class='id mode'>mode</span><span class='rparen'>)</span>
|
1010
|
-
|
1011
|
-
<span class='comment'># open the file
|
1012
|
-
</span> <span class='id path_fid'>path_fid</span> <span class='op'>=</span> <span class='id walk'>walk</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
1013
|
-
|
1014
|
-
<span class='id talk'>talk</span> <span class='const'>Topen</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span>
|
1015
|
-
<span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id path_fid'>path_fid</span><span class='comma'>,</span>
|
1016
|
-
<span class='symbol'>:mode</span> <span class='op'>=></span> <span class='id mode'>mode</span>
|
1017
|
-
<span class='rparen'>)</span>
|
1018
|
-
|
1019
|
-
<span class='id stream'>stream</span> <span class='op'>=</span> <span class='const'>FidStream</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id path_fid'>path_fid</span><span class='comma'>,</span> <span class='ivar'>@msize</span><span class='rparen'>)</span>
|
1020
|
-
|
1021
|
-
<span class='comment'># return the file stream
|
1022
|
-
</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span>
|
1023
|
-
<span class='kw'>begin</span>
|
1024
|
-
<span class='kw'>yield</span> <span class='id stream'>stream</span>
|
1025
|
-
<span class='kw'>ensure</span>
|
1026
|
-
<span class='id stream'>stream</span><span class='period'>.</span><span class='id close'>close</span>
|
1027
|
-
<span class='kw'>end</span>
|
1028
|
-
<span class='kw'>else</span>
|
1029
|
-
<span class='id stream'>stream</span>
|
1030
|
-
<span class='kw'>end</span>
|
1031
|
-
<span class='kw'>end</span></pre>
|
1032
|
-
</td>
|
1033
|
-
</tr>
|
1034
|
-
</table>
|
1035
|
-
</div>
|
1036
|
-
|
1037
|
-
<div class="method_details ">
|
1038
|
-
<p class="signature " id="read-instance_method">
|
1039
|
-
|
1040
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>read</strong>(path, *args)
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
</p><div class="docstring">
|
1045
|
-
<div class="discussion">
|
1046
|
-
<p>
|
1047
|
-
Returns the content of the file/directory at the given path.
|
1048
|
-
</p>
|
1049
|
-
|
1050
|
-
|
1051
|
-
</div>
|
1052
|
-
</div>
|
1053
|
-
<div class="tags">
|
1054
|
-
|
1055
|
-
</div><table class="source_code">
|
1056
|
-
<tr>
|
1057
|
-
<td>
|
1058
|
-
<pre class="lines">
|
1059
|
-
|
1060
|
-
|
1061
|
-
357
|
1062
|
-
358
|
1063
|
-
359
|
1064
|
-
360
|
1065
|
-
361</pre>
|
1066
|
-
</td>
|
1067
|
-
<td>
|
1068
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 357</span>
|
1069
|
-
|
1070
|
-
<span class='kw'>def</span> <span class='id read'>read</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='op'>*</span><span class='id args'>args</span>
|
1071
|
-
<span class='id open'>open</span> <span class='id path'>path</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id f'>f</span><span class='op'>|</span>
|
1072
|
-
<span class='id f'>f</span><span class='period'>.</span><span class='id read'>read</span><span class='lparen'>(</span><span class='op'>*</span><span class='id args'>args</span><span class='rparen'>)</span>
|
1073
|
-
<span class='kw'>end</span>
|
1074
|
-
<span class='kw'>end</span></pre>
|
1075
|
-
</td>
|
1076
|
-
</tr>
|
1077
|
-
</table>
|
1078
|
-
</div>
|
1079
|
-
|
1080
|
-
<div class="method_details ">
|
1081
|
-
<p class="signature " id="recv-instance_method">
|
1082
|
-
|
1083
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>recv</strong>(tag)
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
</p><div class="docstring">
|
1088
|
-
<div class="discussion">
|
1089
|
-
<p>
|
1090
|
-
Returns the reply for the given ticket, which was previously given to you
|
1091
|
-
when you sent the corresponding request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt>.
|
1092
|
-
</p>
|
1093
|
-
|
1094
|
-
|
1095
|
-
</div>
|
1096
|
-
</div>
|
1097
|
-
<div class="tags">
|
1098
|
-
|
1099
|
-
</div><table class="source_code">
|
1100
|
-
<tr>
|
1101
|
-
<td>
|
1102
|
-
<pre class="lines">
|
1103
|
-
|
1104
|
-
|
1105
|
-
120
|
1106
|
-
121
|
1107
|
-
122
|
1108
|
-
123
|
1109
|
-
124
|
1110
|
-
125
|
1111
|
-
126
|
1112
|
-
127
|
1113
|
-
128
|
1114
|
-
129
|
1115
|
-
130
|
1116
|
-
131
|
1117
|
-
132
|
1118
|
-
133
|
1119
|
-
134
|
1120
|
-
135
|
1121
|
-
136
|
1122
|
-
137
|
1123
|
-
138
|
1124
|
-
139
|
1125
|
-
140
|
1126
|
-
141
|
1127
|
-
142
|
1128
|
-
143
|
1129
|
-
144
|
1130
|
-
145
|
1131
|
-
146
|
1132
|
-
147
|
1133
|
-
148
|
1134
|
-
149
|
1135
|
-
150
|
1136
|
-
151
|
1137
|
-
152
|
1138
|
-
153
|
1139
|
-
154
|
1140
|
-
155
|
1141
|
-
156
|
1142
|
-
157
|
1143
|
-
158
|
1144
|
-
159
|
1145
|
-
160
|
1146
|
-
161
|
1147
|
-
162
|
1148
|
-
163
|
1149
|
-
164
|
1150
|
-
165
|
1151
|
-
166
|
1152
|
-
167</pre>
|
1153
|
-
</td>
|
1154
|
-
<td>
|
1155
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 120</span>
|
1156
|
-
|
1157
|
-
<span class='kw'>def</span> <span class='id recv'>recv</span> <span class='id tag'>tag</span>
|
1158
|
-
<span class='id loop'>loop</span> <span class='kw'>do</span>
|
1159
|
-
<span class='id reply'>reply</span> <span class='op'>=</span> <span class='ivar'>@recv_lock</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
|
1160
|
-
<span class='kw'>if</span> <span class='ivar'>@recv_buf</span><span class='period'>.</span><span class='id key?'>key?</span> <span class='id tag'>tag</span>
|
1161
|
-
<span class='ivar'>@recv_buf</span><span class='period'>.</span><span class='id delete'>delete</span> <span class='id tag'>tag</span>
|
1162
|
-
<span class='kw'>else</span>
|
1163
|
-
<span class='comment'># reply was not in receive buffer, so read
|
1164
|
-
</span> <span class='comment'># the next reply... hoping that it is ours
|
1165
|
-
</span>
|
1166
|
-
<span class='id next_reply_available'>next_reply_available</span> <span class='op'>=</span>
|
1167
|
-
<span class='ivar'>@recv_buf</span><span class='period'>.</span><span class='id empty?'>empty?</span> <span class='op'>||</span> <span class='kw'>begin</span>
|
1168
|
-
<span class='comment'># check (in a non-blocking fashion) if
|
1169
|
-
</span> <span class='comment'># the stream has reply for us right now
|
1170
|
-
</span> <span class='ivar'>@stream</span><span class='period'>.</span><span class='id ungetc'>ungetc</span> <span class='ivar'>@stream</span><span class='period'>.</span><span class='id read_nonblock'>read_nonblock</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
|
1171
|
-
<span class='kw'>true</span>
|
1172
|
-
<span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>EAGAIN</span>
|
1173
|
-
<span class='comment'># the stream is empty
|
1174
|
-
</span> <span class='kw'>end</span>
|
1175
|
-
|
1176
|
-
<span class='kw'>if</span> <span class='id next_reply_available'>next_reply_available</span>
|
1177
|
-
<span class='id msg'>msg</span> <span class='op'>=</span> <span class='const'>Fcall</span><span class='period'>.</span><span class='id from_9p'>from_9p</span><span class='lparen'>(</span><span class='ivar'>@stream</span><span class='rparen'>)</span>
|
1178
|
-
|
1179
|
-
<span class='kw'>if</span> <span class='id msg'>msg</span><span class='period'>.</span><span class='id tag'>tag</span> <span class='op'>==</span> <span class='id tag'>tag</span>
|
1180
|
-
<span class='id msg'>msg</span>
|
1181
|
-
<span class='kw'>else</span>
|
1182
|
-
<span class='comment'># we got someone else's reply, so buffer
|
1183
|
-
</span> <span class='comment'># it (for them to receive) and try again
|
1184
|
-
</span> <span class='ivar'>@recv_buf</span><span class='lbracket'>[</span><span class='id msg'>msg</span><span class='period'>.</span><span class='id tag'>tag</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id msg'>msg</span>
|
1185
|
-
<span class='kw'>nil</span>
|
1186
|
-
<span class='kw'>end</span>
|
1187
|
-
<span class='kw'>end</span>
|
1188
|
-
<span class='kw'>end</span>
|
1189
|
-
<span class='kw'>end</span>
|
1190
|
-
|
1191
|
-
<span class='kw'>if</span> <span class='id reply'>reply</span>
|
1192
|
-
<span class='ivar'>@tag_pool</span><span class='period'>.</span><span class='id release'>release</span> <span class='id tag'>tag</span>
|
1193
|
-
|
1194
|
-
<span class='kw'>if</span> <span class='id reply'>reply</span><span class='period'>.</span><span class='id is_a?'>is_a?</span> <span class='const'>Rerror</span>
|
1195
|
-
<span class='id raise'>raise</span> <span class='const'>Error</span><span class='comma'>,</span> <span class='id reply'>reply</span><span class='period'>.</span><span class='id ename'>ename</span>
|
1196
|
-
<span class='kw'>end</span>
|
1197
|
-
|
1198
|
-
<span class='kw'>return</span> <span class='id reply'>reply</span>
|
1199
|
-
<span class='kw'>else</span>
|
1200
|
-
<span class='comment'># give other threads a chance to receive
|
1201
|
-
</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id pass'>pass</span>
|
1202
|
-
<span class='kw'>end</span>
|
1203
|
-
<span class='kw'>end</span>
|
1204
|
-
<span class='kw'>end</span></pre>
|
1205
|
-
</td>
|
1206
|
-
</tr>
|
1207
|
-
</table>
|
1208
|
-
</div>
|
1209
|
-
|
1210
|
-
<div class="method_details ">
|
1211
|
-
<p class="signature " id="remove-instance_method">
|
1212
|
-
|
1213
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>remove</strong>(path)
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
</p><div class="docstring">
|
1218
|
-
<div class="discussion">
|
1219
|
-
<p>
|
1220
|
-
Deletes the file at the given path.
|
1221
|
-
</p>
|
1222
|
-
|
1223
|
-
|
1224
|
-
</div>
|
1225
|
-
</div>
|
1226
|
-
<div class="tags">
|
1227
|
-
|
1228
|
-
</div><table class="source_code">
|
1229
|
-
<tr>
|
1230
|
-
<td>
|
1231
|
-
<pre class="lines">
|
1232
|
-
|
1233
|
-
|
1234
|
-
413
|
1235
|
-
414
|
1236
|
-
415
|
1237
|
-
416</pre>
|
1238
|
-
</td>
|
1239
|
-
<td>
|
1240
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 413</span>
|
1241
|
-
|
1242
|
-
<span class='kw'>def</span> <span class='id remove'>remove</span> <span class='id path'>path</span>
|
1243
|
-
<span class='id path_fid'>path_fid</span> <span class='op'>=</span> <span class='id walk'>walk</span><span class='lparen'>(</span><span class='id path'>path</span><span class='rparen'>)</span>
|
1244
|
-
<span class='id remove_fid'>remove_fid</span> <span class='id path_fid'>path_fid</span> <span class='comment'># remove also does clunk
|
1245
|
-
</span><span class='kw'>end</span></pre>
|
1246
|
-
</td>
|
1247
|
-
</tr>
|
1248
|
-
</table>
|
1249
|
-
</div>
|
1250
|
-
|
1251
|
-
<div class="method_details ">
|
1252
|
-
<p class="signature " id="remove_fid-instance_method">
|
1253
|
-
|
1254
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>remove_fid</strong>(path_fid)
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
</p><div class="docstring">
|
1259
|
-
<div class="discussion">
|
1260
|
-
<p>
|
1261
|
-
Deletes the file corresponding to the given FID and clunks the given FID.
|
1262
|
-
</p>
|
1263
|
-
|
1264
|
-
|
1265
|
-
</div>
|
1266
|
-
</div>
|
1267
|
-
<div class="tags">
|
1268
|
-
|
1269
|
-
</div><table class="source_code">
|
1270
|
-
<tr>
|
1271
|
-
<td>
|
1272
|
-
<pre class="lines">
|
1273
|
-
|
1274
|
-
|
1275
|
-
422
|
1276
|
-
423
|
1277
|
-
424</pre>
|
1278
|
-
</td>
|
1279
|
-
<td>
|
1280
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 422</span>
|
1281
|
-
|
1282
|
-
<span class='kw'>def</span> <span class='id remove_fid'>remove_fid</span> <span class='id path_fid'>path_fid</span>
|
1283
|
-
<span class='id talk'>talk</span> <span class='const'>Tremove</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id path_fid'>path_fid</span><span class='rparen'>)</span>
|
1284
|
-
<span class='kw'>end</span></pre>
|
1285
|
-
</td>
|
1286
|
-
</tr>
|
1287
|
-
</table>
|
1288
|
-
</div>
|
1289
|
-
|
1290
|
-
<div class="method_details ">
|
1291
|
-
<p class="signature " id="send-instance_method">
|
1292
|
-
|
1293
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>send</strong>(request)
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
</p><div class="docstring">
|
1298
|
-
<div class="discussion">
|
1299
|
-
<p>
|
1300
|
-
Sends the given request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt> and returns a ticket that you
|
1301
|
-
can use later to receive the reply.
|
1302
|
-
</p>
|
1303
|
-
|
1304
|
-
|
1305
|
-
</div>
|
1306
|
-
</div>
|
1307
|
-
<div class="tags">
|
1308
|
-
|
1309
|
-
</div><table class="source_code">
|
1310
|
-
<tr>
|
1311
|
-
<td>
|
1312
|
-
<pre class="lines">
|
1313
|
-
|
1314
|
-
|
1315
|
-
107
|
1316
|
-
108
|
1317
|
-
109
|
1318
|
-
110
|
1319
|
-
111
|
1320
|
-
112
|
1321
|
-
113
|
1322
|
-
114</pre>
|
1323
|
-
</td>
|
1324
|
-
<td>
|
1325
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 107</span>
|
1326
|
-
|
1327
|
-
<span class='kw'>def</span> <span class='id send'>send</span> <span class='id request'>request</span>
|
1328
|
-
<span class='id tag'>tag</span> <span class='op'>=</span> <span class='ivar'>@tag_pool</span><span class='period'>.</span><span class='id obtain'>obtain</span>
|
1329
|
-
|
1330
|
-
<span class='id request'>request</span><span class='period'>.</span><span class='id tag'>tag</span> <span class='op'>=</span> <span class='id tag'>tag</span>
|
1331
|
-
<span class='ivar'>@stream</span> <span class='op'><<</span> <span class='id request'>request</span><span class='period'>.</span><span class='id to_9p'>to_9p</span>
|
1332
|
-
|
1333
|
-
<span class='id tag'>tag</span>
|
1334
|
-
<span class='kw'>end</span></pre>
|
1335
|
-
</td>
|
1336
|
-
</tr>
|
1337
|
-
</table>
|
1338
|
-
</div>
|
1339
|
-
|
1340
|
-
<div class="method_details ">
|
1341
|
-
<p class="signature " id="stat-instance_method">
|
1342
|
-
|
1343
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>stat</strong>(path)
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
</p><div class="docstring">
|
1348
|
-
<div class="discussion">
|
1349
|
-
<p>
|
1350
|
-
Returns information about the file at the given path.
|
1351
|
-
</p>
|
1352
|
-
|
1353
|
-
|
1354
|
-
</div>
|
1355
|
-
</div>
|
1356
|
-
<div class="tags">
|
1357
|
-
|
1358
|
-
</div><table class="source_code">
|
1359
|
-
<tr>
|
1360
|
-
<td>
|
1361
|
-
<pre class="lines">
|
1362
|
-
|
1363
|
-
|
1364
|
-
429
|
1365
|
-
430
|
1366
|
-
431
|
1367
|
-
432
|
1368
|
-
433
|
1369
|
-
434</pre>
|
1370
|
-
</td>
|
1371
|
-
<td>
|
1372
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 429</span>
|
1373
|
-
|
1374
|
-
<span class='kw'>def</span> <span class='id stat'>stat</span> <span class='id path'>path</span>
|
1375
|
-
<span class='id with_fid'>with_fid</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id path_fid'>path_fid</span><span class='op'>|</span>
|
1376
|
-
<span class='id walk_fid'>walk_fid</span> <span class='id path_fid'>path_fid</span><span class='comma'>,</span> <span class='id path'>path</span>
|
1377
|
-
<span class='id stat_fid'>stat_fid</span> <span class='id path_fid'>path_fid</span>
|
1378
|
-
<span class='kw'>end</span>
|
1379
|
-
<span class='kw'>end</span></pre>
|
1380
|
-
</td>
|
1381
|
-
</tr>
|
1382
|
-
</table>
|
1383
|
-
</div>
|
1384
|
-
|
1385
|
-
<div class="method_details ">
|
1386
|
-
<p class="signature " id="stat_fid-instance_method">
|
1387
|
-
|
1388
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>stat_fid</strong>(path_fid)
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
</p><div class="docstring">
|
1393
|
-
<div class="discussion">
|
1394
|
-
<p>
|
1395
|
-
Returns information about the file referenced by the given FID.
|
1396
|
-
</p>
|
1397
|
-
|
1398
|
-
|
1399
|
-
</div>
|
1400
|
-
</div>
|
1401
|
-
<div class="tags">
|
1402
|
-
|
1403
|
-
</div><table class="source_code">
|
1404
|
-
<tr>
|
1405
|
-
<td>
|
1406
|
-
<pre class="lines">
|
1407
|
-
|
1408
|
-
|
1409
|
-
439
|
1410
|
-
440
|
1411
|
-
441
|
1412
|
-
442
|
1413
|
-
443</pre>
|
1414
|
-
</td>
|
1415
|
-
<td>
|
1416
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 439</span>
|
1417
|
-
|
1418
|
-
<span class='kw'>def</span> <span class='id stat_fid'>stat_fid</span> <span class='id path_fid'>path_fid</span>
|
1419
|
-
<span class='id req'>req</span> <span class='op'>=</span> <span class='const'>Tstat</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='symbol'>:fid</span> <span class='op'>=></span> <span class='id path_fid'>path_fid</span><span class='rparen'>)</span>
|
1420
|
-
<span class='id rsp'>rsp</span> <span class='op'>=</span> <span class='id talk'>talk</span><span class='lparen'>(</span><span class='id req'>req</span><span class='rparen'>)</span>
|
1421
|
-
<span class='id rsp'>rsp</span><span class='period'>.</span><span class='id stat'>stat</span>
|
1422
|
-
<span class='kw'>end</span></pre>
|
1423
|
-
</td>
|
1424
|
-
</tr>
|
1425
|
-
</table>
|
1426
|
-
</div>
|
1427
|
-
|
1428
|
-
<div class="method_details ">
|
1429
|
-
<p class="signature " id="talk-instance_method">
|
1430
|
-
|
1431
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>talk</strong>(request)
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
</p><div class="docstring">
|
1436
|
-
<div class="discussion">
|
1437
|
-
<p>
|
1438
|
-
Sends the given request <tt><a href="Fcall.html" title="Rumai::IXP::Fcall (class)">Rumai::IXP::Fcall</a></tt> and returns its reply.
|
1439
|
-
</p>
|
1440
|
-
|
1441
|
-
|
1442
|
-
</div>
|
1443
|
-
</div>
|
1444
|
-
<div class="tags">
|
1445
|
-
|
1446
|
-
</div><table class="source_code">
|
1447
|
-
<tr>
|
1448
|
-
<td>
|
1449
|
-
<pre class="lines">
|
1450
|
-
|
1451
|
-
|
1452
|
-
172
|
1453
|
-
173
|
1454
|
-
174
|
1455
|
-
175
|
1456
|
-
176
|
1457
|
-
177
|
1458
|
-
178
|
1459
|
-
179
|
1460
|
-
180
|
1461
|
-
181</pre>
|
1462
|
-
</td>
|
1463
|
-
<td>
|
1464
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 172</span>
|
1465
|
-
|
1466
|
-
<span class='kw'>def</span> <span class='id talk'>talk</span> <span class='id request'>request</span>
|
1467
|
-
<span class='id tag'>tag</span> <span class='op'>=</span> <span class='id send'>send</span><span class='lparen'>(</span><span class='id request'>request</span><span class='rparen'>)</span>
|
1468
|
-
|
1469
|
-
<span class='kw'>begin</span>
|
1470
|
-
<span class='id recv'>recv</span> <span class='id tag'>tag</span>
|
1471
|
-
<span class='kw'>rescue</span> <span class='const'>Error</span> <span class='op'>=></span> <span class='id e'>e</span>
|
1472
|
-
<span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> -- in reply to </span><span class='embexpr_beg'>#{</span><span class='id request'>request</span><span class='period'>.</span><span class='id inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1473
|
-
<span class='id raise'>raise</span>
|
1474
|
-
<span class='kw'>end</span>
|
1475
|
-
<span class='kw'>end</span></pre>
|
1476
|
-
</td>
|
1477
|
-
</tr>
|
1478
|
-
</table>
|
1479
|
-
</div>
|
1480
|
-
|
1481
|
-
<div class="method_details ">
|
1482
|
-
<p class="signature " id="walk-instance_method">
|
1483
|
-
|
1484
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>walk</strong>(path)
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
</p><div class="docstring">
|
1489
|
-
<div class="discussion">
|
1490
|
-
<p>
|
1491
|
-
Returns an FID corresponding to the given path.
|
1492
|
-
</p>
|
1493
|
-
|
1494
|
-
|
1495
|
-
</div>
|
1496
|
-
</div>
|
1497
|
-
<div class="tags">
|
1498
|
-
|
1499
|
-
</div><table class="source_code">
|
1500
|
-
<tr>
|
1501
|
-
<td>
|
1502
|
-
<pre class="lines">
|
1503
|
-
|
1504
|
-
|
1505
|
-
448
|
1506
|
-
449
|
1507
|
-
450
|
1508
|
-
451
|
1509
|
-
452</pre>
|
1510
|
-
</td>
|
1511
|
-
<td>
|
1512
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 448</span>
|
1513
|
-
|
1514
|
-
<span class='kw'>def</span> <span class='id walk'>walk</span> <span class='id path'>path</span>
|
1515
|
-
<span class='id fid'>fid</span> <span class='op'>=</span> <span class='ivar'>@fid_pool</span><span class='period'>.</span><span class='id obtain'>obtain</span>
|
1516
|
-
<span class='id walk_fid'>walk_fid</span> <span class='id fid'>fid</span><span class='comma'>,</span> <span class='id path'>path</span>
|
1517
|
-
<span class='id fid'>fid</span>
|
1518
|
-
<span class='kw'>end</span></pre>
|
1519
|
-
</td>
|
1520
|
-
</tr>
|
1521
|
-
</table>
|
1522
|
-
</div>
|
1523
|
-
|
1524
|
-
<div class="method_details ">
|
1525
|
-
<p class="signature " id="walk_fid-instance_method">
|
1526
|
-
|
1527
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>walk_fid</strong>(path_fid, path)
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
</p><div class="docstring">
|
1532
|
-
<div class="discussion">
|
1533
|
-
<p>
|
1534
|
-
Associates the given FID to the given path.
|
1535
|
-
</p>
|
1536
|
-
|
1537
|
-
|
1538
|
-
</div>
|
1539
|
-
</div>
|
1540
|
-
<div class="tags">
|
1541
|
-
|
1542
|
-
</div><table class="source_code">
|
1543
|
-
<tr>
|
1544
|
-
<td>
|
1545
|
-
<pre class="lines">
|
1546
|
-
|
1547
|
-
|
1548
|
-
457
|
1549
|
-
458
|
1550
|
-
459
|
1551
|
-
460
|
1552
|
-
461
|
1553
|
-
462
|
1554
|
-
463</pre>
|
1555
|
-
</td>
|
1556
|
-
<td>
|
1557
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 457</span>
|
1558
|
-
|
1559
|
-
<span class='kw'>def</span> <span class='id walk_fid'>walk_fid</span> <span class='id path_fid'>path_fid</span><span class='comma'>,</span> <span class='id path'>path</span>
|
1560
|
-
<span class='id talk'>talk</span> <span class='const'>Twalk</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span>
|
1561
|
-
<span class='symbol'>:fid</span> <span class='op'>=></span> <span class='ivar'>@root_fid</span><span class='comma'>,</span>
|
1562
|
-
<span class='symbol'>:newfid</span> <span class='op'>=></span> <span class='id path_fid'>path_fid</span><span class='comma'>,</span>
|
1563
|
-
<span class='symbol'>:wname</span> <span class='op'>=></span> <span class='id path'>path</span><span class='period'>.</span><span class='id to_s'>to_s</span><span class='period'>.</span><span class='id split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>%r{</span><span class='tstring_content'>/+</span><span class='regexp_end'>}</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id reject'>reject</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id s'>s</span><span class='op'>|</span> <span class='id s'>s</span><span class='period'>.</span><span class='id empty?'>empty?</span> <span class='rbrace'>}</span>
|
1564
|
-
<span class='rparen'>)</span>
|
1565
|
-
<span class='kw'>end</span></pre>
|
1566
|
-
</td>
|
1567
|
-
</tr>
|
1568
|
-
</table>
|
1569
|
-
</div>
|
1570
|
-
|
1571
|
-
<div class="method_details ">
|
1572
|
-
<p class="signature " id="write-instance_method">
|
1573
|
-
|
1574
|
-
- (<tt><a href="../../Object.html" title="Object (class)">Object</a></tt>) <strong>write</strong>(path, content)
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
</p><div class="docstring">
|
1579
|
-
<div class="discussion">
|
1580
|
-
<p>
|
1581
|
-
Writes the given content to the file at the given path.
|
1582
|
-
</p>
|
1583
|
-
|
1584
|
-
|
1585
|
-
</div>
|
1586
|
-
</div>
|
1587
|
-
<div class="tags">
|
1588
|
-
|
1589
|
-
</div><table class="source_code">
|
1590
|
-
<tr>
|
1591
|
-
<td>
|
1592
|
-
<pre class="lines">
|
1593
|
-
|
1594
|
-
|
1595
|
-
381
|
1596
|
-
382
|
1597
|
-
383
|
1598
|
-
384
|
1599
|
-
385</pre>
|
1600
|
-
</td>
|
1601
|
-
<td>
|
1602
|
-
<pre class="code"><span class="info file"># File 'lib/rumai/ixp/transport.rb', line 381</span>
|
1603
|
-
|
1604
|
-
<span class='kw'>def</span> <span class='id write'>write</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='id content'>content</span>
|
1605
|
-
<span class='id open'>open</span> <span class='id path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>w</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id f'>f</span><span class='op'>|</span>
|
1606
|
-
<span class='id f'>f</span> <span class='op'><<</span> <span class='id content'>content</span>
|
1607
|
-
<span class='kw'>end</span>
|
1608
|
-
<span class='kw'>end</span></pre>
|
1609
|
-
</td>
|
1610
|
-
</tr>
|
1611
|
-
</table>
|
1612
|
-
</div>
|
1613
|
-
|
1614
|
-
</div>
|
1615
|
-
|
1616
|
-
</div>
|
1617
|
-
|
1618
|
-
<div id="footer">
|
1619
|
-
Generated on Thu Apr 1 00:31:01 2010 by
|
1620
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
1621
|
-
0.5.4 (ruby-1.9.1).
|
1622
|
-
</div>
|
1623
|
-
|
1624
|
-
</body>
|
1625
|
-
</html>
|