rio 0.4.2 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (641) hide show
  1. data/.gitignore +21 -0
  2. data/Gemfile +4 -0
  3. data/{COPYING → LICENSE} +3 -0
  4. data/README +20 -27
  5. data/Rakefile +48 -277
  6. data/lib/rio.rb +63 -24
  7. data/lib/rio/.document +5 -0
  8. data/lib/rio/abstract_method.rb +3 -14
  9. data/lib/rio/alturi.rb +507 -0
  10. data/lib/rio/alturi/algorithm.rb +313 -0
  11. data/lib/rio/alturi/cached_fields.rb +68 -0
  12. data/lib/rio/alturi/escape.rb +82 -0
  13. data/lib/rio/alturi/parse.rb +75 -0
  14. data/lib/rio/alturi/path_parts.rb +81 -0
  15. data/lib/rio/alturi/regex.rb +76 -0
  16. data/lib/rio/alturi/uri_parts.rb +512 -0
  17. data/lib/rio/argv.rb +3 -14
  18. data/lib/rio/arraynge.rb +146 -0
  19. data/lib/rio/arycopy.rb +3 -14
  20. data/lib/rio/assert.rb +87 -15
  21. data/lib/rio/base.rb +7 -30
  22. data/lib/rio/callstr.rb +3 -14
  23. data/lib/rio/const.rb +3 -14
  24. data/lib/rio/construct.rb +4 -15
  25. data/lib/rio/constructor.rb +4 -19
  26. data/lib/rio/context.rb +17 -14
  27. data/lib/rio/context/autoclose.rb +3 -14
  28. data/lib/rio/context/binmode.rb +63 -0
  29. data/lib/rio/context/copying.rb +3 -14
  30. data/lib/rio/context/cxx.rb +3 -14
  31. data/lib/rio/context/dir.rb +5 -15
  32. data/lib/rio/context/encoding.rb +84 -0
  33. data/lib/rio/context/gzip.rb +3 -14
  34. data/lib/rio/context/methods.rb +8 -17
  35. data/lib/rio/context/skip.rb +3 -14
  36. data/lib/rio/context/stream.rb +3 -14
  37. data/lib/rio/cp.rb +5 -20
  38. data/lib/rio/cxuri.rb +67 -0
  39. data/lib/rio/dbg/trace_states.rb +18 -0
  40. data/lib/rio/def.rb +3 -14
  41. data/lib/rio/dir.rb +9 -18
  42. data/lib/rio/doc.rb +3 -14
  43. data/lib/rio/doc/EXAMPLES.rb +256 -269
  44. data/lib/rio/doc/HOWTO.rb +685 -707
  45. data/lib/rio/doc/INDEX.rb +261 -282
  46. data/lib/rio/doc/INTRO.rb +1029 -1040
  47. data/lib/rio/doc/OPTIONAL.rb +77 -103
  48. data/lib/rio/doc/SYNOPSIS.rb +122 -143
  49. data/lib/rio/entrysel.rb +3 -14
  50. data/lib/rio/exception.rb +4 -14
  51. data/lib/rio/exception/copy.rb +3 -14
  52. data/lib/rio/exception/notimplemented.rb +3 -14
  53. data/lib/rio/exception/notsupported.rb +3 -14
  54. data/lib/rio/exception/open.rb +3 -14
  55. data/lib/rio/exception/state.rb +3 -14
  56. data/lib/rio/ext.rb +14 -17
  57. data/lib/rio/ext/csv.rb +25 -304
  58. data/lib/rio/ext/csv/csv-legacy.rb +344 -0
  59. data/lib/rio/ext/csv/csv.rb +359 -0
  60. data/lib/rio/ext/csv/filter.rb +209 -0
  61. data/lib/rio/ext/if.rb +3 -14
  62. data/lib/rio/ext/mp3info.rb +3 -14
  63. data/lib/rio/ext/splitlines.rb +3 -14
  64. data/lib/rio/ext/yaml.rb +3 -14
  65. data/lib/rio/ext/yaml/doc.rb +3 -14
  66. data/lib/rio/ext/yaml/tie.rb +3 -14
  67. data/lib/rio/ext/zipfile.rb +3 -14
  68. data/lib/rio/ext/zipfile/fs.rb +3 -14
  69. data/lib/rio/ext/zipfile/rl.rb +3 -14
  70. data/lib/rio/ext/zipfile/rootdir.rb +3 -14
  71. data/lib/rio/ext/zipfile/state.rb +3 -14
  72. data/lib/rio/ext/zipfile/wrap.rb +3 -14
  73. data/lib/rio/factory.rb +96 -213
  74. data/lib/rio/fibpipe.rb +373 -0
  75. data/lib/rio/file.rb +8 -17
  76. data/lib/rio/filter.rb +4 -15
  77. data/lib/rio/filter/closeoneof.rb +3 -14
  78. data/lib/rio/filter/gzip.rb +18 -27
  79. data/lib/rio/fs.rb +172 -0
  80. data/lib/rio/fs/base.rb +3 -14
  81. data/lib/rio/fs/impl.rb +3 -14
  82. data/lib/rio/fs/native.rb +3 -14
  83. data/lib/rio/fs/stream.rb +3 -14
  84. data/lib/rio/fs/url.rb +3 -14
  85. data/lib/rio/ftp/conncache.rb +16 -18
  86. data/lib/rio/ftp/dir.rb +4 -15
  87. data/lib/rio/ftp/fs.rb +62 -42
  88. data/lib/rio/fwd.rb +15 -0
  89. data/lib/rio/grande.rb +4 -15
  90. data/lib/rio/handle.rb +3 -45
  91. data/lib/rio/if.rb +15 -20
  92. data/lib/rio/if/basic.rb +3 -36
  93. data/lib/rio/if/csv.rb +7 -20
  94. data/lib/rio/if/dir.rb +9 -21
  95. data/lib/rio/if/file.rb +6 -19
  96. data/lib/rio/if/fileordir.rb +18 -29
  97. data/lib/rio/if/grande.rb +109 -120
  98. data/lib/rio/if/grande_entry.rb +5 -18
  99. data/lib/rio/if/grande_stream.rb +29 -42
  100. data/lib/rio/if/internal.rb +15 -16
  101. data/lib/rio/if/path.rb +35 -47
  102. data/lib/rio/if/rubyio.rb +35 -47
  103. data/lib/rio/if/string.rb +3 -16
  104. data/lib/rio/if/temp.rb +3 -16
  105. data/lib/rio/if/test.rb +8 -20
  106. data/lib/rio/if/yaml.rb +16 -29
  107. data/lib/rio/ioh.rb +35 -34
  108. data/lib/rio/iomode.rb +3 -14
  109. data/lib/rio/ios/fail.rb +3 -14
  110. data/lib/rio/ios/generic.rb +3 -14
  111. data/lib/rio/ios/mode.rb +3 -14
  112. data/lib/rio/ios/null.rb +3 -14
  113. data/lib/rio/iowrap.rb +3 -14
  114. data/lib/rio/kernel.rb +4 -17
  115. data/lib/rio/local.rb +3 -14
  116. data/lib/rio/match.rb +3 -14
  117. data/lib/rio/matchrecord.rb +8 -17
  118. data/lib/rio/no_warn.rb +3 -14
  119. data/lib/rio/nullio.rb +3 -14
  120. data/lib/rio/open3.rb +3 -16
  121. data/lib/rio/ops.rb +33 -0
  122. data/lib/rio/ops/construct.rb +3 -14
  123. data/lib/rio/ops/create.rb +11 -25
  124. data/lib/rio/ops/dir.rb +17 -24
  125. data/lib/rio/ops/either.rb +28 -31
  126. data/lib/rio/ops/file.rb +29 -26
  127. data/lib/rio/ops/path.rb +65 -34
  128. data/lib/rio/ops/stream.rb +13 -15
  129. data/lib/rio/ops/stream/input.rb +59 -28
  130. data/lib/rio/ops/stream/output.rb +4 -14
  131. data/lib/rio/ops/stream/read.rb +4 -15
  132. data/lib/rio/ops/stream/write.rb +3 -14
  133. data/lib/rio/ops/symlink.rb +6 -15
  134. data/lib/rio/path.rb +10 -17
  135. data/lib/rio/path/reset.rb +3 -14
  136. data/lib/rio/piper.rb +3 -27
  137. data/lib/rio/piper/cp.rb +50 -27
  138. data/lib/rio/prompt.rb +3 -14
  139. data/lib/rio/rectype.rb +8 -16
  140. data/lib/rio/rl/base.rb +12 -25
  141. data/lib/rio/rl/builder.rb +25 -24
  142. data/lib/rio/rl/chmap.rb +3 -16
  143. data/lib/rio/rl/fs2url.rb +5 -16
  144. data/lib/rio/rl/ioi.rb +3 -14
  145. data/lib/rio/rl/path.rb +14 -25
  146. data/lib/rio/rl/pathmethods.rb +3 -14
  147. data/lib/rio/rl/uri.rb +18 -35
  148. data/lib/rio/rl/withpath.rb +36 -53
  149. data/lib/rio/rrl/base.rb +75 -0
  150. data/lib/rio/rrl/builder.rb +122 -0
  151. data/lib/rio/rrl/chmap.rb +53 -0
  152. data/lib/rio/rrl/ioi.rb +78 -0
  153. data/lib/rio/rrl/path.rb +117 -0
  154. data/lib/rio/rrl/withpath.rb +269 -0
  155. data/lib/rio/scheme/aryio.rb +3 -14
  156. data/lib/rio/scheme/cmdio.rb +73 -42
  157. data/lib/rio/scheme/cmdpipe.rb +122 -59
  158. data/lib/rio/scheme/fd.rb +19 -33
  159. data/lib/rio/scheme/ftp.rb +34 -40
  160. data/lib/rio/scheme/http.rb +13 -22
  161. data/lib/rio/scheme/null.rb +6 -17
  162. data/lib/rio/scheme/path.rb +60 -71
  163. data/lib/rio/scheme/stderr.rb +9 -21
  164. data/lib/rio/scheme/stdio.rb +14 -26
  165. data/lib/rio/scheme/strio.rb +37 -38
  166. data/lib/rio/scheme/sysio.rb +20 -32
  167. data/lib/rio/scheme/tcp.rb +3 -14
  168. data/lib/rio/scheme/temp.rb +103 -92
  169. data/lib/rio/state.rb +85 -67
  170. data/lib/rio/state/data.rb +55 -0
  171. data/lib/rio/state/error.rb +7 -27
  172. data/lib/rio/stream.rb +46 -19
  173. data/lib/rio/stream/base.rb +14 -14
  174. data/lib/rio/stream/duplex.rb +64 -26
  175. data/lib/rio/stream/open.rb +9 -19
  176. data/lib/rio/symantics.rb +3 -14
  177. data/lib/rio/tempdir.rb +8 -17
  178. data/lib/rio/to_rio.rb +3 -16
  179. data/lib/rio/to_rio/all.rb +3 -14
  180. data/lib/rio/to_rio/array.rb +3 -14
  181. data/lib/rio/to_rio/io.rb +3 -14
  182. data/lib/rio/to_rio/object.rb +3 -14
  183. data/lib/rio/to_rio/string.rb +3 -14
  184. data/lib/rio/uri/file.rb +98 -153
  185. data/lib/rio/uriref.rb +144 -0
  186. data/lib/rio/util.rb +3 -14
  187. data/lib/rio/version.rb +4 -15
  188. data/misc/clean-heading-comments.rb +39 -0
  189. data/misc/fixdoclinks.rb +36 -0
  190. data/misc/update-copyright.rb +17 -0
  191. data/rio.gemspec +31 -0
  192. data/test/alturi/tc/create.rb +24 -0
  193. data/test/alturi/tc/empty.rb +13 -0
  194. data/test/alturi/tc/encoding.rb +73 -0
  195. data/test/alturi/tc/file_test.rb +335 -0
  196. data/test/alturi/tc/ftp_alturi.rb +147 -0
  197. data/test/alturi/tc/generic_test.rb +335 -0
  198. data/test/alturi/tc/http_test.rb +359 -0
  199. data/test/alturi/tc/path_parts_test.rb +215 -0
  200. data/test/alturi/tc/rfc_test.rb +83 -0
  201. data/test/alturi/tc/uri_parts_authority.rb +129 -0
  202. data/test/alturi/tc/uri_parts_test.rb +473 -0
  203. data/test/alturi/tc/uri_parts_userinfo.rb +140 -0
  204. data/test/alturi/tests.rb +27 -0
  205. data/test/base_test.rb +18 -0
  206. data/test/bin/demo_chdir.rb +60 -0
  207. data/test/bin/elipsis.rb +11 -0
  208. data/test/env.sh +4 -0
  209. data/test/ftp/initftpfiles.rb +1 -0
  210. data/test/ftp/tc/anon_copy_data.rb +31 -0
  211. data/test/ftp/tc/anon_misc.rb +109 -0
  212. data/test/ftp/tc/anon_read.rb +99 -0
  213. data/test/ftp/tc/anon_special.rb +37 -0
  214. data/test/ftp/tc/anon_write.rb +68 -0
  215. data/test/ftp/tc/copy.rb +35 -0
  216. data/test/ftp/tc/empty.rb +16 -0
  217. data/test/ftp/tc/ftp2ftp.rb +42 -0
  218. data/test/ftp/tc/ftp_fs.rb +333 -0
  219. data/test/ftp/testdef.rb +7 -2
  220. data/test/ftp/tests.rb +24 -0
  221. data/test/gem_runtests.rb +1 -1
  222. data/test/http/copy-from-http.rb +0 -1
  223. data/test/http/def.rb +20 -0
  224. data/test/http/tc/copy_from_http.rb +128 -0
  225. data/test/http/tc/empty.rb +14 -0
  226. data/test/http/tc/uri_meta.rb +52 -0
  227. data/test/http/tests.rb +19 -0
  228. data/test/lib/assertions.rb +7 -0
  229. data/test/lib/run_tests.rb +26 -0
  230. data/test/lib/temp_server.rb +7 -4
  231. data/test/methods/test_suite.rb +108 -0
  232. data/test/platform.rb +5 -0
  233. data/test/qpdir.rb +2 -0
  234. data/test/rio/scheme.rb +49 -0
  235. data/test/rio/tc/pathparts.rb +61 -0
  236. data/test/riotest/test_suite.rb +33 -0
  237. data/test/riotest/unit_test.rb +118 -0
  238. data/test/riotest/util.rb +23 -0
  239. data/test/runalltests.rb +1 -1
  240. data/test/runftptests.rb +2 -7
  241. data/test/runhttp.rb +4 -2
  242. data/test/runhttptests.rb +6 -5
  243. data/test/runtests.rb +66 -37
  244. data/test/srv/www/htdocs/riotest/dir/index.html +11 -0
  245. data/test/srv/www/htdocs/riotest/hw.html +8 -0
  246. data/test/srv/www/htdocs/riotest/lines.txt.gz +0 -0
  247. data/test/tc/abs2.rb +358 -0
  248. data/test/tc/all.rb +17 -10
  249. data/test/tc/base2.rb +8 -7
  250. data/test/tc/clearsel.rb +3 -2
  251. data/test/tc/closeoneof.rb +14 -15
  252. data/test/tc/cmdio.rb +193 -0
  253. data/test/tc/cmdpipe.rb +258 -63
  254. data/test/tc/copy.rb +3 -2
  255. data/test/tc/copyarray.rb +0 -4
  256. data/test/tc/copydest.rb +2 -3
  257. data/test/tc/copydir.rb +5 -1
  258. data/test/tc/copydir2.rb +68 -0
  259. data/test/tc/create.rb +4 -9
  260. data/test/tc/csv.rb +38 -119
  261. data/test/tc/csv2.rb +38 -57
  262. data/test/tc/csv_columns.rb +210 -8
  263. data/test/tc/csv_gzip.rb +78 -0
  264. data/test/tc/csv_headers.rb +134 -0
  265. data/test/tc/csvutil.rb +53 -16
  266. data/test/tc/dir.rb +3 -4
  267. data/test/tc/dir_iter.rb +3 -1
  268. data/test/tc/dirent.rb +8 -7
  269. data/test/tc/each.rb +62 -47
  270. data/test/tc/each_break.rb +67 -25
  271. data/test/tc/edf.rb +3 -2
  272. data/test/tc/empty.rb +6 -4
  273. data/test/tc/encoding.rb +30 -0
  274. data/test/tc/entary.rb +6 -5
  275. data/test/tc/eq.rb +2 -2
  276. data/test/tc/expand_path.rb +14 -14
  277. data/test/tc/ext.rb +7 -7
  278. data/test/tc/fileno.rb +3 -2
  279. data/test/tc/files_select.rb +1 -1
  280. data/test/tc/getrec.rb +2 -3
  281. data/test/tc/gzip.rb +5 -3
  282. data/test/tc/likeio.rb +5 -5
  283. data/test/tc/lineno.rb +1 -1
  284. data/test/tc/lines.rb +4 -4
  285. data/test/tc/misc.rb +29 -171
  286. data/test/tc/nolines.rb +4 -2
  287. data/test/tc/noqae.rb +12 -10
  288. data/test/tc/overload.rb +1 -2
  289. data/test/tc/pa.rb +25 -24
  290. data/test/tc/path_parts.rb +54 -20
  291. data/test/tc/paths.rb +3 -2
  292. data/test/tc/piper.rb +32 -31
  293. data/test/tc/programs_util.rb +9 -9
  294. data/test/tc/qae.rb +9 -8
  295. data/test/tc/qae_riovar.rb +9 -8
  296. data/test/tc/records.rb +3 -2
  297. data/test/tc/rename.rb +4 -4
  298. data/test/tc/riorl.rb +19 -19
  299. data/test/tc/rlparts.ans.yml +1161 -0
  300. data/test/tc/splitlines.rb +1 -1
  301. data/test/tc/splitpath.rb +9 -8
  302. data/test/tc/strio.rb +73 -0
  303. data/test/tc/symlink.rb +3 -2
  304. data/test/tc/symlink0.rb +4 -3
  305. data/test/tc/symlink1.rb +4 -3
  306. data/test/tc/temp.rb +40 -26
  307. data/test/tc/tempdir.rb +12 -12
  308. data/test/tc/testcase.rb +45 -31
  309. data/test/tc/tonl.rb +0 -1
  310. data/test/tc/truncate.rb +111 -13
  311. data/test/tc/yaml.rb +1 -1
  312. data/test/test_suite.rb +31 -0
  313. data/test/tests.rb +35 -0
  314. data/test/tsuite.rb +19 -0
  315. data/test/uriref/tc/basic.rb +171 -0
  316. data/test/uriref/tc/build.rb +30 -0
  317. data/test/uriref/tc/empty.rb +13 -0
  318. data/test/uriref/tc/route.rb +72 -0
  319. data/test/uriref/tests.rb +16 -0
  320. metadata +356 -424
  321. data/ChangeLog +0 -3122
  322. data/VERSION +0 -1
  323. data/build_doc.rb +0 -94
  324. data/doc/ANNOUNCE +0 -157
  325. data/doc/RELEASE_NOTES +0 -308
  326. data/doc/RIOIS +0 -215
  327. data/doc/generators/template/html/rio.css +0 -428
  328. data/doc/generators/template/html/rio.rb +0 -523
  329. data/doc/generators/template/html/ugly.rb +0 -132
  330. data/doc/pkg_def.rb +0 -60
  331. data/doc/rdoc/classes/Kernel.html +0 -133
  332. data/doc/rdoc/classes/Kernel.src/M000234.html +0 -18
  333. data/doc/rdoc/classes/RIO.html +0 -625
  334. data/doc/rdoc/classes/RIO.src/M000001.html +0 -18
  335. data/doc/rdoc/classes/RIO.src/M000002.html +0 -18
  336. data/doc/rdoc/classes/RIO.src/M000003.html +0 -18
  337. data/doc/rdoc/classes/RIO/Doc.html +0 -149
  338. data/doc/rdoc/classes/RIO/Doc/EXAMPLES.html +0 -432
  339. data/doc/rdoc/classes/RIO/Doc/HOWTO.html +0 -1084
  340. data/doc/rdoc/classes/RIO/Doc/INDEX.html +0 -368
  341. data/doc/rdoc/classes/RIO/Doc/INTRO.html +0 -1529
  342. data/doc/rdoc/classes/RIO/Doc/OPTIONAL.html +0 -221
  343. data/doc/rdoc/classes/RIO/Doc/SYNOPSIS.html +0 -336
  344. data/doc/rdoc/classes/RIO/IF.html +0 -165
  345. data/doc/rdoc/classes/RIO/IF/CSV.html +0 -203
  346. data/doc/rdoc/classes/RIO/IF/CSV.src/M000129.html +0 -19
  347. data/doc/rdoc/classes/RIO/IF/CSV.src/M000130.html +0 -16
  348. data/doc/rdoc/classes/RIO/IF/CSV.src/M000131.html +0 -16
  349. data/doc/rdoc/classes/RIO/IF/Dir.html +0 -343
  350. data/doc/rdoc/classes/RIO/IF/Dir.src/M000045.html +0 -16
  351. data/doc/rdoc/classes/RIO/IF/Dir.src/M000046.html +0 -16
  352. data/doc/rdoc/classes/RIO/IF/Dir.src/M000047.html +0 -16
  353. data/doc/rdoc/classes/RIO/IF/Dir.src/M000048.html +0 -16
  354. data/doc/rdoc/classes/RIO/IF/Dir.src/M000049.html +0 -16
  355. data/doc/rdoc/classes/RIO/IF/Dir.src/M000050.html +0 -16
  356. data/doc/rdoc/classes/RIO/IF/Dir.src/M000051.html +0 -16
  357. data/doc/rdoc/classes/RIO/IF/File.html +0 -223
  358. data/doc/rdoc/classes/RIO/IF/File.src/M000216.html +0 -16
  359. data/doc/rdoc/classes/RIO/IF/File.src/M000217.html +0 -16
  360. data/doc/rdoc/classes/RIO/IF/File.src/M000218.html +0 -16
  361. data/doc/rdoc/classes/RIO/IF/File.src/M000219.html +0 -16
  362. data/doc/rdoc/classes/RIO/IF/FileOrDir.html +0 -572
  363. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000117.html +0 -16
  364. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000118.html +0 -16
  365. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000119.html +0 -16
  366. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000120.html +0 -16
  367. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000121.html +0 -16
  368. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000122.html +0 -16
  369. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000123.html +0 -16
  370. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000124.html +0 -16
  371. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000125.html +0 -16
  372. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000126.html +0 -16
  373. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000127.html +0 -16
  374. data/doc/rdoc/classes/RIO/IF/FileOrDir.src/M000128.html +0 -16
  375. data/doc/rdoc/classes/RIO/IF/Grande.html +0 -1376
  376. data/doc/rdoc/classes/RIO/IF/Grande.src/M000052.html +0 -16
  377. data/doc/rdoc/classes/RIO/IF/Grande.src/M000053.html +0 -16
  378. data/doc/rdoc/classes/RIO/IF/Grande.src/M000054.html +0 -16
  379. data/doc/rdoc/classes/RIO/IF/Grande.src/M000055.html +0 -16
  380. data/doc/rdoc/classes/RIO/IF/Grande.src/M000056.html +0 -16
  381. data/doc/rdoc/classes/RIO/IF/Grande.src/M000057.html +0 -16
  382. data/doc/rdoc/classes/RIO/IF/Grande.src/M000058.html +0 -21
  383. data/doc/rdoc/classes/RIO/IF/Grande.src/M000059.html +0 -16
  384. data/doc/rdoc/classes/RIO/IF/Grande.src/M000060.html +0 -16
  385. data/doc/rdoc/classes/RIO/IF/Grande.src/M000061.html +0 -16
  386. data/doc/rdoc/classes/RIO/IF/Grande.src/M000062.html +0 -16
  387. data/doc/rdoc/classes/RIO/IF/Grande.src/M000063.html +0 -16
  388. data/doc/rdoc/classes/RIO/IF/Grande.src/M000064.html +0 -16
  389. data/doc/rdoc/classes/RIO/IF/Grande.src/M000065.html +0 -21
  390. data/doc/rdoc/classes/RIO/IF/Grande.src/M000066.html +0 -16
  391. data/doc/rdoc/classes/RIO/IF/Grande.src/M000067.html +0 -16
  392. data/doc/rdoc/classes/RIO/IF/Grande.src/M000068.html +0 -16
  393. data/doc/rdoc/classes/RIO/IF/Grande.src/M000069.html +0 -16
  394. data/doc/rdoc/classes/RIO/IF/Grande.src/M000070.html +0 -16
  395. data/doc/rdoc/classes/RIO/IF/GrandeEntry.html +0 -810
  396. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000107.html +0 -16
  397. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000108.html +0 -16
  398. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000109.html +0 -16
  399. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000110.html +0 -16
  400. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000111.html +0 -16
  401. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000112.html +0 -16
  402. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000113.html +0 -16
  403. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000114.html +0 -16
  404. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000115.html +0 -16
  405. data/doc/rdoc/classes/RIO/IF/GrandeEntry.src/M000116.html +0 -16
  406. data/doc/rdoc/classes/RIO/IF/GrandeStream.html +0 -1513
  407. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000071.html +0 -16
  408. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000072.html +0 -16
  409. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000073.html +0 -16
  410. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000074.html +0 -16
  411. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000075.html +0 -16
  412. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000076.html +0 -16
  413. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000077.html +0 -16
  414. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000078.html +0 -16
  415. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000079.html +0 -16
  416. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000080.html +0 -16
  417. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000081.html +0 -16
  418. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000082.html +0 -16
  419. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000083.html +0 -16
  420. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000084.html +0 -16
  421. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000085.html +0 -16
  422. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000086.html +0 -16
  423. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000087.html +0 -19
  424. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000088.html +0 -16
  425. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000089.html +0 -16
  426. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000090.html +0 -16
  427. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000091.html +0 -16
  428. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000092.html +0 -16
  429. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000093.html +0 -16
  430. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000094.html +0 -16
  431. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000095.html +0 -16
  432. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000096.html +0 -16
  433. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000097.html +0 -16
  434. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000098.html +0 -16
  435. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000099.html +0 -16
  436. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000100.html +0 -16
  437. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000101.html +0 -16
  438. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000102.html +0 -16
  439. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000103.html +0 -16
  440. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000104.html +0 -16
  441. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000105.html +0 -16
  442. data/doc/rdoc/classes/RIO/IF/GrandeStream.src/M000106.html +0 -16
  443. data/doc/rdoc/classes/RIO/IF/Path.html +0 -999
  444. data/doc/rdoc/classes/RIO/IF/Path.src/M000132.html +0 -16
  445. data/doc/rdoc/classes/RIO/IF/Path.src/M000133.html +0 -16
  446. data/doc/rdoc/classes/RIO/IF/Path.src/M000134.html +0 -16
  447. data/doc/rdoc/classes/RIO/IF/Path.src/M000135.html +0 -16
  448. data/doc/rdoc/classes/RIO/IF/Path.src/M000136.html +0 -16
  449. data/doc/rdoc/classes/RIO/IF/Path.src/M000137.html +0 -16
  450. data/doc/rdoc/classes/RIO/IF/Path.src/M000138.html +0 -16
  451. data/doc/rdoc/classes/RIO/IF/Path.src/M000139.html +0 -16
  452. data/doc/rdoc/classes/RIO/IF/Path.src/M000140.html +0 -16
  453. data/doc/rdoc/classes/RIO/IF/Path.src/M000141.html +0 -16
  454. data/doc/rdoc/classes/RIO/IF/Path.src/M000142.html +0 -16
  455. data/doc/rdoc/classes/RIO/IF/Path.src/M000143.html +0 -16
  456. data/doc/rdoc/classes/RIO/IF/Path.src/M000144.html +0 -16
  457. data/doc/rdoc/classes/RIO/IF/Path.src/M000145.html +0 -16
  458. data/doc/rdoc/classes/RIO/IF/Path.src/M000146.html +0 -16
  459. data/doc/rdoc/classes/RIO/IF/Path.src/M000147.html +0 -16
  460. data/doc/rdoc/classes/RIO/IF/Path.src/M000148.html +0 -16
  461. data/doc/rdoc/classes/RIO/IF/Path.src/M000149.html +0 -16
  462. data/doc/rdoc/classes/RIO/IF/Path.src/M000150.html +0 -16
  463. data/doc/rdoc/classes/RIO/IF/Path.src/M000151.html +0 -16
  464. data/doc/rdoc/classes/RIO/IF/Path.src/M000152.html +0 -16
  465. data/doc/rdoc/classes/RIO/IF/Path.src/M000153.html +0 -16
  466. data/doc/rdoc/classes/RIO/IF/Path.src/M000154.html +0 -18
  467. data/doc/rdoc/classes/RIO/IF/Path.src/M000155.html +0 -16
  468. data/doc/rdoc/classes/RIO/IF/Path.src/M000156.html +0 -16
  469. data/doc/rdoc/classes/RIO/IF/Path.src/M000157.html +0 -16
  470. data/doc/rdoc/classes/RIO/IF/Path.src/M000158.html +0 -16
  471. data/doc/rdoc/classes/RIO/IF/Path.src/M000159.html +0 -16
  472. data/doc/rdoc/classes/RIO/IF/Path.src/M000160.html +0 -16
  473. data/doc/rdoc/classes/RIO/IF/Path.src/M000161.html +0 -16
  474. data/doc/rdoc/classes/RIO/IF/Path.src/M000162.html +0 -16
  475. data/doc/rdoc/classes/RIO/IF/Path.src/M000163.html +0 -16
  476. data/doc/rdoc/classes/RIO/IF/RubyIO.html +0 -1416
  477. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000004.html +0 -16
  478. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000005.html +0 -16
  479. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000006.html +0 -16
  480. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000007.html +0 -16
  481. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000008.html +0 -16
  482. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000009.html +0 -16
  483. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000010.html +0 -16
  484. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000011.html +0 -16
  485. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000012.html +0 -16
  486. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000013.html +0 -16
  487. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000014.html +0 -16
  488. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000015.html +0 -16
  489. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000016.html +0 -16
  490. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000017.html +0 -16
  491. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000018.html +0 -16
  492. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000019.html +0 -16
  493. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000020.html +0 -16
  494. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000021.html +0 -16
  495. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000022.html +0 -16
  496. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000023.html +0 -16
  497. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000024.html +0 -16
  498. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000025.html +0 -16
  499. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000026.html +0 -16
  500. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000027.html +0 -16
  501. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000028.html +0 -16
  502. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000029.html +0 -16
  503. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000030.html +0 -16
  504. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000031.html +0 -16
  505. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000032.html +0 -16
  506. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000033.html +0 -16
  507. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000034.html +0 -16
  508. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000035.html +0 -16
  509. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000036.html +0 -16
  510. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000037.html +0 -16
  511. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000038.html +0 -16
  512. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000039.html +0 -16
  513. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000040.html +0 -16
  514. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000041.html +0 -16
  515. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000042.html +0 -16
  516. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000043.html +0 -16
  517. data/doc/rdoc/classes/RIO/IF/RubyIO.src/M000044.html +0 -16
  518. data/doc/rdoc/classes/RIO/IF/String.html +0 -203
  519. data/doc/rdoc/classes/RIO/IF/String.src/M000213.html +0 -16
  520. data/doc/rdoc/classes/RIO/IF/String.src/M000214.html +0 -16
  521. data/doc/rdoc/classes/RIO/IF/String.src/M000215.html +0 -16
  522. data/doc/rdoc/classes/RIO/IF/Test.html +0 -990
  523. data/doc/rdoc/classes/RIO/IF/Test.src/M000177.html +0 -16
  524. data/doc/rdoc/classes/RIO/IF/Test.src/M000178.html +0 -16
  525. data/doc/rdoc/classes/RIO/IF/Test.src/M000179.html +0 -16
  526. data/doc/rdoc/classes/RIO/IF/Test.src/M000180.html +0 -16
  527. data/doc/rdoc/classes/RIO/IF/Test.src/M000181.html +0 -16
  528. data/doc/rdoc/classes/RIO/IF/Test.src/M000182.html +0 -16
  529. data/doc/rdoc/classes/RIO/IF/Test.src/M000183.html +0 -16
  530. data/doc/rdoc/classes/RIO/IF/Test.src/M000184.html +0 -16
  531. data/doc/rdoc/classes/RIO/IF/Test.src/M000185.html +0 -16
  532. data/doc/rdoc/classes/RIO/IF/Test.src/M000186.html +0 -16
  533. data/doc/rdoc/classes/RIO/IF/Test.src/M000187.html +0 -16
  534. data/doc/rdoc/classes/RIO/IF/Test.src/M000188.html +0 -16
  535. data/doc/rdoc/classes/RIO/IF/Test.src/M000189.html +0 -16
  536. data/doc/rdoc/classes/RIO/IF/Test.src/M000190.html +0 -16
  537. data/doc/rdoc/classes/RIO/IF/Test.src/M000191.html +0 -16
  538. data/doc/rdoc/classes/RIO/IF/Test.src/M000192.html +0 -16
  539. data/doc/rdoc/classes/RIO/IF/Test.src/M000193.html +0 -16
  540. data/doc/rdoc/classes/RIO/IF/Test.src/M000194.html +0 -16
  541. data/doc/rdoc/classes/RIO/IF/Test.src/M000195.html +0 -16
  542. data/doc/rdoc/classes/RIO/IF/Test.src/M000196.html +0 -16
  543. data/doc/rdoc/classes/RIO/IF/Test.src/M000197.html +0 -16
  544. data/doc/rdoc/classes/RIO/IF/Test.src/M000198.html +0 -16
  545. data/doc/rdoc/classes/RIO/IF/Test.src/M000199.html +0 -16
  546. data/doc/rdoc/classes/RIO/IF/Test.src/M000200.html +0 -16
  547. data/doc/rdoc/classes/RIO/IF/Test.src/M000201.html +0 -16
  548. data/doc/rdoc/classes/RIO/IF/Test.src/M000202.html +0 -16
  549. data/doc/rdoc/classes/RIO/IF/Test.src/M000203.html +0 -16
  550. data/doc/rdoc/classes/RIO/IF/Test.src/M000204.html +0 -16
  551. data/doc/rdoc/classes/RIO/IF/Test.src/M000205.html +0 -16
  552. data/doc/rdoc/classes/RIO/IF/Test.src/M000206.html +0 -16
  553. data/doc/rdoc/classes/RIO/IF/Test.src/M000207.html +0 -16
  554. data/doc/rdoc/classes/RIO/IF/Test.src/M000208.html +0 -16
  555. data/doc/rdoc/classes/RIO/IF/Test.src/M000209.html +0 -16
  556. data/doc/rdoc/classes/RIO/IF/Test.src/M000210.html +0 -16
  557. data/doc/rdoc/classes/RIO/IF/Test.src/M000211.html +0 -16
  558. data/doc/rdoc/classes/RIO/IF/Test.src/M000212.html +0 -16
  559. data/doc/rdoc/classes/RIO/IF/YAML.html +0 -517
  560. data/doc/rdoc/classes/RIO/IF/YAML.src/M000164.html +0 -19
  561. data/doc/rdoc/classes/RIO/IF/YAML.src/M000165.html +0 -16
  562. data/doc/rdoc/classes/RIO/IF/YAML.src/M000166.html +0 -16
  563. data/doc/rdoc/classes/RIO/IF/YAML.src/M000167.html +0 -16
  564. data/doc/rdoc/classes/RIO/IF/YAML.src/M000168.html +0 -16
  565. data/doc/rdoc/classes/RIO/IF/YAML.src/M000169.html +0 -16
  566. data/doc/rdoc/classes/RIO/IF/YAML.src/M000170.html +0 -16
  567. data/doc/rdoc/classes/RIO/IF/YAML.src/M000171.html +0 -16
  568. data/doc/rdoc/classes/RIO/IF/YAML.src/M000172.html +0 -16
  569. data/doc/rdoc/classes/RIO/IF/YAML.src/M000173.html +0 -16
  570. data/doc/rdoc/classes/RIO/IF/YAML.src/M000174.html +0 -16
  571. data/doc/rdoc/classes/RIO/IF/YAML.src/M000175.html +0 -16
  572. data/doc/rdoc/classes/RIO/IF/YAML.src/M000176.html +0 -16
  573. data/doc/rdoc/classes/RIO/Rio.html +0 -508
  574. data/doc/rdoc/classes/RIO/Rio.src/M000220.html +0 -18
  575. data/doc/rdoc/classes/RIO/Rio.src/M000221.html +0 -20
  576. data/doc/rdoc/classes/RIO/Rio.src/M000222.html +0 -27
  577. data/doc/rdoc/classes/RIO/Rio.src/M000223.html +0 -16
  578. data/doc/rdoc/classes/RIO/Rio.src/M000225.html +0 -19
  579. data/doc/rdoc/classes/RIO/Rio.src/M000226.html +0 -20
  580. data/doc/rdoc/classes/RIO/Rio.src/M000227.html +0 -16
  581. data/doc/rdoc/classes/RIO/Rio.src/M000228.html +0 -16
  582. data/doc/rdoc/classes/RIO/Rio.src/M000229.html +0 -16
  583. data/doc/rdoc/classes/RIO/Rio.src/M000230.html +0 -16
  584. data/doc/rdoc/classes/RIO/Rio.src/M000231.html +0 -16
  585. data/doc/rdoc/classes/RIO/Rio.src/M000232.html +0 -16
  586. data/doc/rdoc/classes/RIO/Rio.src/M000233.html +0 -16
  587. data/doc/rdoc/created.rid +0 -1
  588. data/doc/rdoc/files/README.html +0 -232
  589. data/doc/rdoc/files/lib/rio/constructor_rb.html +0 -141
  590. data/doc/rdoc/files/lib/rio/doc/EXAMPLES_rb.html +0 -134
  591. data/doc/rdoc/files/lib/rio/doc/HOWTO_rb.html +0 -134
  592. data/doc/rdoc/files/lib/rio/doc/INDEX_rb.html +0 -134
  593. data/doc/rdoc/files/lib/rio/doc/INTRO_rb.html +0 -134
  594. data/doc/rdoc/files/lib/rio/doc/OPTIONAL_rb.html +0 -134
  595. data/doc/rdoc/files/lib/rio/doc/SYNOPSIS_rb.html +0 -134
  596. data/doc/rdoc/files/lib/rio/if/basic_rb.html +0 -134
  597. data/doc/rdoc/files/lib/rio/if/csv_rb.html +0 -134
  598. data/doc/rdoc/files/lib/rio/if/dir_rb.html +0 -134
  599. data/doc/rdoc/files/lib/rio/if/file_rb.html +0 -134
  600. data/doc/rdoc/files/lib/rio/if/fileordir_rb.html +0 -134
  601. data/doc/rdoc/files/lib/rio/if/grande_entry_rb.html +0 -134
  602. data/doc/rdoc/files/lib/rio/if/grande_rb.html +0 -141
  603. data/doc/rdoc/files/lib/rio/if/grande_stream_rb.html +0 -134
  604. data/doc/rdoc/files/lib/rio/if/internal_rb.html +0 -134
  605. data/doc/rdoc/files/lib/rio/if/path_rb.html +0 -134
  606. data/doc/rdoc/files/lib/rio/if/rubyio_rb.html +0 -134
  607. data/doc/rdoc/files/lib/rio/if/string_rb.html +0 -134
  608. data/doc/rdoc/files/lib/rio/if/temp_rb.html +0 -134
  609. data/doc/rdoc/files/lib/rio/if/test_rb.html +0 -134
  610. data/doc/rdoc/files/lib/rio/if/yaml_rb.html +0 -134
  611. data/doc/rdoc/files/lib/rio/kernel_rb.html +0 -142
  612. data/doc/rdoc/files/lib/rio_rb.html +0 -153
  613. data/doc/rdoc/fr_class_index.html +0 -49
  614. data/doc/rdoc/fr_file_index.html +0 -51
  615. data/doc/rdoc/fr_method_index.html +0 -260
  616. data/doc/rdoc/index.html +0 -30
  617. data/doc/rdoc/rdoc-style.css +0 -428
  618. data/doc/rfc1738.txt +0 -1403
  619. data/doc/rfc959.txt +0 -3933
  620. data/ex/catcsv.rb +0 -64
  621. data/ex/colx.rb +0 -8
  622. data/ex/findinruby +0 -15
  623. data/ex/findruby +0 -14
  624. data/ex/passwd_report.rb +0 -8
  625. data/ex/prompt.rb +0 -25
  626. data/ex/rgb.txt.gz +0 -0
  627. data/ex/riocat +0 -42
  628. data/ex/riogunzip +0 -31
  629. data/ex/riogzip +0 -24
  630. data/ex/rioprompt.rb +0 -10
  631. data/ex/targz2zip +0 -17
  632. data/ex/tonl +0 -10
  633. data/setup.rb +0 -1360
  634. data/test/ftp/all.rb +0 -9
  635. data/test/ftp/anon_copy_data.rb +0 -36
  636. data/test/ftp/anon_misc.rb +0 -124
  637. data/test/ftp/anon_read.rb +0 -105
  638. data/test/ftp/anon_special.rb +0 -68
  639. data/test/ftp/anon_write.rb +0 -70
  640. data/test/ftp/ftp2ftp.rb +0 -51
  641. data/test/tc/abs.rb +0 -355
@@ -1,16 +0,0 @@
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>dirs (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 71</span>
14
- 71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirs</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">dirs</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>skipdirs (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 91</span>
14
- 91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skipdirs</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">skipdirs</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>entries (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 114</span>
14
- 114: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entries</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>skipentries (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 124</span>
14
- 124: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skipentries</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">skipentries</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>files (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 281</span>
14
- 281: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">files</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>skipfiles (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 300</span>
14
- 300: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skipfiles</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">skipfiles</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>all? (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 313</span>
14
- 313: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all?</span>() <span class="ruby-identifier">target</span>.<span class="ruby-identifier">all?</span>() <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>all (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 331</span>
14
- 331: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all</span>(<span class="ruby-identifier">arg</span>=<span class="ruby-keyword kw">true</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">all</span>(<span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>recurse (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 355</span>
14
- 355: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recurse</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">recurse</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,16 +0,0 @@
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>norecurse (RIO::IF::GrandeEntry)</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/rio/if/grande_entry.rb, line 368</span>
14
- 368: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">norecurse</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-identifier">target</span>.<span class="ruby-identifier">norecurse</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>); <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">end</span></pre>
15
- </body>
16
- </html>
@@ -1,1513 +0,0 @@
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>Module: RIO::IF::GrandeStream</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
- <meta name="revisit-after" content="5 days">
12
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
13
- <script type="text/javascript">
14
- // <![CDATA[
15
-
16
- function popupCode( url ) {
17
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
18
- }
19
-
20
- function toggleCode( id ) {
21
- if ( document.getElementById )
22
- elem = document.getElementById( id );
23
- else if ( document.all )
24
- elem = eval( "document.all." + id );
25
- else
26
- return false;
27
-
28
- elemStyle = elem.style;
29
-
30
- if ( elemStyle.display != "block" ) {
31
- elemStyle.display = "block"
32
- } else {
33
- elemStyle.display = "none"
34
- }
35
-
36
- return true;
37
- }
38
-
39
- // Make codeblocks hidden by default
40
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
41
-
42
- // ]]>
43
- </script>
44
-
45
- </head>
46
- <body>
47
-
48
-
49
-
50
- <div id="classHeader">
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td class="class-mod"><strong>Module</strong></td>
54
- <td class="class-name-in-header">RIO::IF::GrandeStream</td>
55
- <td rowspan="2" class="class-header-space-col"></td>
56
- <td rowspan="2">
57
- <a class="in-url" href="../../../files/lib/rio/if/grande_stream_rb.html">
58
- lib/rio/if/grande_stream.rb
59
- </a>
60
- &nbsp;&nbsp;
61
- </td>
62
- </tr>
63
-
64
- </table>
65
- </div>
66
- <!-- banner header -->
67
-
68
- <div id="bodyContent">
69
-
70
-
71
-
72
- <div id="contextContent">
73
-
74
-
75
-
76
- </div>
77
-
78
- <div id="method-list">
79
- <h3 class="section-bar">Methods</h3>
80
-
81
- <div class="name-list">
82
- <a href="#M000087">+@</a>&nbsp;&nbsp;
83
- <a href="#M000086">a</a>&nbsp;&nbsp;
84
- <a href="#M000088">a!</a>&nbsp;&nbsp;
85
- <a href="#M000075">bytes</a>&nbsp;&nbsp;
86
- <a href="#M000101">chomp</a>&nbsp;&nbsp;
87
- <a href="#M000100">chomp?</a>&nbsp;&nbsp;
88
- <a href="#M000096">closeoncopy</a>&nbsp;&nbsp;
89
- <a href="#M000098">closeoncopy?</a>&nbsp;&nbsp;
90
- <a href="#M000093">closeoneof</a>&nbsp;&nbsp;
91
- <a href="#M000095">closeoneof?</a>&nbsp;&nbsp;
92
- <a href="#M000084">contents</a>&nbsp;&nbsp;
93
- <a href="#M000083">getline</a>&nbsp;&nbsp;
94
- <a href="#M000081">getrec</a>&nbsp;&nbsp;
95
- <a href="#M000082">getrow</a>&nbsp;&nbsp;
96
- <a href="#M000104">gzip</a>&nbsp;&nbsp;
97
- <a href="#M000105">gzip?</a>&nbsp;&nbsp;
98
- <a href="#M000071">line</a>&nbsp;&nbsp;
99
- <a href="#M000074">lines</a>&nbsp;&nbsp;
100
- <a href="#M000099">noautoclose</a>&nbsp;&nbsp;
101
- <a href="#M000097">nocloseoncopy</a>&nbsp;&nbsp;
102
- <a href="#M000094">nocloseoneof</a>&nbsp;&nbsp;
103
- <a href="#M000085">putrec</a>&nbsp;&nbsp;
104
- <a href="#M000089">r</a>&nbsp;&nbsp;
105
- <a href="#M000090">r!</a>&nbsp;&nbsp;
106
- <a href="#M000072">record</a>&nbsp;&nbsp;
107
- <a href="#M000076">records</a>&nbsp;&nbsp;
108
- <a href="#M000073">row</a>&nbsp;&nbsp;
109
- <a href="#M000079">rows</a>&nbsp;&nbsp;
110
- <a href="#M000078">skiplines</a>&nbsp;&nbsp;
111
- <a href="#M000077">skiprecords</a>&nbsp;&nbsp;
112
- <a href="#M000080">skiprows</a>&nbsp;&nbsp;
113
- <a href="#M000106">splitlines</a>&nbsp;&nbsp;
114
- <a href="#M000103">strip</a>&nbsp;&nbsp;
115
- <a href="#M000102">strip?</a>&nbsp;&nbsp;
116
- <a href="#M000091">w</a>&nbsp;&nbsp;
117
- <a href="#M000092">w!</a>&nbsp;&nbsp;
118
- </div>
119
- </div>
120
-
121
-
122
-
123
- <!-- if includes -->
124
-
125
- <div id="section">
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
- <!-- if method_list -->
135
- <div id="methods">
136
- <h3 class="section-bar">Public Instance methods</h3>
137
-
138
- <div id="method-M000087" class="method-detail">
139
- <a name="M000087"></a>
140
-
141
- <div class="method-heading">
142
- <a href="GrandeStream.src/M000087.html" target="Code" class="method-signature"
143
- onclick="popupCode('GrandeStream.src/M000087.html');return false;">
144
- <span class="method-name">+@</span><span class="method-args">()</span>
145
- </a>
146
- </div>
147
-
148
- <div class="method-description">
149
- <p>
150
- Unary Plus. Alternate form of <a href="GrandeStream.html#M000086">a</a>
151
- </p>
152
- <pre>
153
- rio('f1') &gt; rio('f2') # copy f1 to f2
154
- rio('f1') &gt; rio('f2').a # append f1 to f2
155
- rio('f1') &gt; +rio('f2') # same thing
156
- rio('f1') &gt;&gt; rio('f2') # same thing
157
- </pre>
158
- </div>
159
- </div>
160
-
161
- <div id="method-M000086" class="method-detail">
162
- <a name="M000086"></a>
163
-
164
- <div class="method-heading">
165
- <a href="GrandeStream.src/M000086.html" target="Code" class="method-signature"
166
- onclick="popupCode('GrandeStream.src/M000086.html');return false;">
167
- <span class="method-name">a</span><span class="method-args">()</span>
168
- </a>
169
- </div>
170
-
171
- <div class="method-description">
172
- <p>
173
- Sets the implicit output mode to &#8216;a&#8217;.
174
- </p>
175
- <p>
176
- This is the mode Rio will use for output when no mode is specified
177
- </p>
178
- <p>
179
- Rios normally don&#8217;t need to be opened or have their open mode
180
- specified. A Rio determines the mode based on the file system object and on
181
- the action specified. For instance when a Rio encounters a <tt>read</tt> on
182
- a file it opens the file for reading using File#open and calls IO#read;
183
- when it encounters a <tt>read</tt> on a directory it knows to use Dir#open
184
- and call Dir#read. When it encounters a <a
185
- href="RubyIO.html#M000021">puts</a>, it knows to perform a File#open, and
186
- call IO#puts on the returned handle. By default when a method requires a
187
- file be opened for writing the file is opened with a mode of
188
- &#8216;w&#8217;. <a href="GrandeStream.html#M000086">a</a> changes this
189
- implicit output mode to &#8216;a&#8217;.
190
- </p>
191
- <p>
192
- Note that this is not the same as setting the output mode
193
- <b>explicitly</b>, as in rio(&#8216;afile&#8217;).mode(&#8216;a&#8217;).
194
- When the mode is set explicitly using <a
195
- href="RubyIO.html#M000028">mode</a>, the mode specified will be used
196
- regardless of the operation being performed. The <a
197
- href="GrandeStream.html#M000086">a</a> method only affects how Rio opens a
198
- file when it sees an operator that requires writing, and must determine for
199
- itself how to open it.
200
- </p>
201
- <pre>
202
- rio('afile').puts!('Hello World') # call IO#puts on a file handle opened in 'w' mode
203
- rio('afile').a.puts!('Hello World') # call IO#puts on a file handle opened in 'a' mode
204
- </pre>
205
- <p>
206
- See also <a href="GrandeStream.html#M000088">a!</a>, <a
207
- href="GrandeStream.html#M000092">w!</a> for setting the implicit output
208
- mode &#8216;a+&#8217; and &#8216;w+&#8217; respectively
209
- </p>
210
- <p>
211
- The methods <a href="GrandeStream.html#M000086">a</a>, <a
212
- href="GrandeStream.html#M000088">a!</a>, <a
213
- href="GrandeStream.html#M000091">w</a>, <a
214
- href="GrandeStream.html#M000092">w!</a>, <a
215
- href="GrandeStream.html#M000089">r</a>, <a
216
- href="GrandeStream.html#M000090">r!</a> set the <tt>implicit</tt> open mode
217
- to
218
- &#8216;a&#8217;,&#8217;a+&#8217;,&#8217;w&#8217;,&#8217;w+&#8217;,&#8217;r&#8217;
219
- and &#8216;r+&#8217; respectively.
220
- </p>
221
- <p>
222
- See also <a href="GrandeStream.html#M000087">+@</a>
223
- </p>
224
- </div>
225
- </div>
226
-
227
- <div id="method-M000088" class="method-detail">
228
- <a name="M000088"></a>
229
-
230
- <div class="method-heading">
231
- <a href="GrandeStream.src/M000088.html" target="Code" class="method-signature"
232
- onclick="popupCode('GrandeStream.src/M000088.html');return false;">
233
- <span class="method-name">a!</span><span class="method-args">()</span>
234
- </a>
235
- </div>
236
-
237
- <div class="method-description">
238
- <p>
239
- Sets the implicit output mode to &#8216;a+&#8217;.
240
- </p>
241
- <p>
242
- The implicit output mode is the mode Rio will use for output when no mode
243
- is specified.
244
- </p>
245
- <p>
246
- Returns the Rio
247
- </p>
248
- <p>
249
- See the discussion for <a href="GrandeStream.html#M000086">a</a>.
250
- </p>
251
- </div>
252
- </div>
253
-
254
- <div id="method-M000075" class="method-detail">
255
- <a name="M000075"></a>
256
-
257
- <div class="method-heading">
258
- <a href="GrandeStream.src/M000075.html" target="Code" class="method-signature"
259
- onclick="popupCode('GrandeStream.src/M000075.html');return false;">
260
- <span class="method-name">bytes</span><span class="method-args">(n=1,*args,&amp;block)</span>
261
- </a>
262
- </div>
263
-
264
- <div class="method-description">
265
- <p>
266
- Sets the rio to read bytes and returns the rio
267
- </p>
268
- <p>
269
- <em>n</em> specifies the number of bytes to be returned on each iteration
270
- of <a href="Grande.html#M000054">each</a> or by <a
271
- href="GrandeStream.html#M000081">getrec</a>. If <em>args</em> are provided,
272
- they are treated as record selectors as if
273
- <tt>ario.bytes(n).records(*args)</tt> had been called. See also <a
274
- href="GrandeStream.html#M000076">records</a>, <a
275
- href="GrandeStream.html#M000074">lines</a>, <a
276
- href="Grande.html#M000054">each</a>, <a href="Grande.html#M000053">[]</a>
277
- </p>
278
- <p>
279
- If called with a block behaves as if
280
- <tt>ario.bytes(n,*args).each(&amp;block)</tt> had been called
281
- </p>
282
- <pre>
283
- rio('f.dat').bytes(1024) { |rec| ... } # iterate through f.txt 1024 bytes at a time
284
- rio('f.dat').bytes(1024).each { |rec| ... } # same as above
285
-
286
- rio('f.dat').bytes(1024,0..4) { |rec| ... } # iterate through the first five 1024 byte blocks
287
-
288
- rio('f.dat').bytes(64).to_a # return the contents of f.dat as an array of 64 byte chunks
289
-
290
- rio('f.dat').bytes(512).records(0,7..9) &gt; rio('dfile.dat') # copy 512-byte blocks 0,7,8 and 9 to dfile.dat
291
-
292
- rio('f.dat').bytes(2048).records[0...10] # return an array containing the first 10 2K blocks of f.dat
293
- rio('f.dat').bytes(2048)[0...10] # same thing
294
-
295
- rio('f.dat').bytes { |bytestr| ... } # iterate over f.dat 1 byte at a time.
296
- rio('f.dat').bytes[0...100] # returns an array of the first 100 bytes of f.dat
297
- </pre>
298
- </div>
299
- </div>
300
-
301
- <div id="method-M000101" class="method-detail">
302
- <a name="M000101"></a>
303
-
304
- <div class="method-heading">
305
- <a href="GrandeStream.src/M000101.html" target="Code" class="method-signature"
306
- onclick="popupCode('GrandeStream.src/M000101.html');return false;">
307
- <span class="method-name">chomp</span><span class="method-args">(arg=true,&amp;block)</span>
308
- </a>
309
- </div>
310
-
311
- <div class="method-description">
312
- <p>
313
- Sets the Rio to chomp lines and returns the Rio
314
- </p>
315
- <p>
316
- When called with a block, behaves as if <tt>chomp.each(&amp;block)</tt> had
317
- been called
318
- </p>
319
- <p>
320
- chomp causes lines returned by each, to_a, readlines, readline, gets,
321
- each_line etc. to be chomped before iterated over or assigned
322
- </p>
323
- <pre>
324
- rio('f.txt').chomp.each { |line| ... } # Block is called with lines already chomped
325
-
326
- rio('f.txt').chomp { |line| ... } # same as above
327
-
328
- rio('f.txt').chomp.to_a # returns the lines of f.txt chomped
329
-
330
- rio('f.txt').chomp.lines(1..2).to_a # returns an array containg lines 1 and 2 of the file after being chomped
331
-
332
- This would have similar results to rio('f.txt').lines(1..2).to_a.map{ |line| line.chomp}
333
-
334
- rio('f.txt').lines(1..2).chomp.to_a # same as above
335
-
336
- rio('f.txt').chomp.readlines # returns the lines of f.txt chomped
337
-
338
- rio('f.txt').chomp.gets # returns the first line of 'f.txt' chomped
339
-
340
- rio('f.txt').chomp &gt; an_array # copies the chomped lines of f.txt into an_array
341
-
342
- # fill an array with all the 'require' lines in all the .rb files (recursively) in adir
343
- # chomping each line
344
-
345
- an_array = []
346
- rio('adir').chomp.all.files(&quot;*.rb&quot;) { |file|
347
- an_array += file.lines[/^\s*require/]
348
- }
349
-
350
- or simply
351
-
352
- an_array = rio('adir').chomp.all.files(&quot;*.rb&quot;).lines[/^\s*require/]
353
- </pre>
354
- </div>
355
- </div>
356
-
357
- <div id="method-M000100" class="method-detail">
358
- <a name="M000100"></a>
359
-
360
- <div class="method-heading">
361
- <a href="GrandeStream.src/M000100.html" target="Code" class="method-signature"
362
- onclick="popupCode('GrandeStream.src/M000100.html');return false;">
363
- <span class="method-name">chomp?</span><span class="method-args">()</span>
364
- </a>
365
- </div>
366
-
367
- <div class="method-description">
368
- <p>
369
- Queries the Rio&#8217;s chomp-mode. See <a
370
- href="GrandeStream.html#M000101">chomp</a>.
371
- </p>
372
- </div>
373
- </div>
374
-
375
- <div id="method-M000096" class="method-detail">
376
- <a name="M000096"></a>
377
-
378
- <div class="method-heading">
379
- <a href="GrandeStream.src/M000096.html" target="Code" class="method-signature"
380
- onclick="popupCode('GrandeStream.src/M000096.html');return false;">
381
- <span class="method-name">closeoncopy</span><span class="method-args">(arg=true,&amp;block)</span>
382
- </a>
383
- </div>
384
-
385
- <div class="method-description">
386
- <p>
387
- Set a Rio&#8217;s closeoncopy mode
388
- </p>
389
- <pre>
390
- ario.closeoncopy(&amp;block) =&gt; ario
391
- </pre>
392
- <p>
393
- <a href="GrandeStream.html#M000096">closeoncopy</a> causes the Rio being
394
- written to to be closed when using a grande copy operator. While <a
395
- href="GrandeStream.html#M000093">closeoneof</a> causes all Rio&#8217;s to
396
- be closed when reading to the end of file, it does not affect Rios being
397
- written to. <a href="GrandeStream.html#M000096">closeoncopy</a> only
398
- affects the Rio being written to and only when a grande copy operator is
399
- used. <tt>closeoncopy</tt> is on by default, with one exception.
400
- </p>
401
- <pre>
402
- dest = rio('destfile')
403
- dest &lt; rio('srcfile')
404
- dest.closed? #=&gt; true
405
-
406
- dest = rio('destfile').nocloseoncopy
407
- dest &lt; rio('srcfile')
408
- dest.closed? #=&gt; false
409
- dest.close # must be explicitly closed
410
-
411
- dest = rio('destfile')
412
- dest.print(rio('srcfile').contents)
413
- dest.closed? #=&gt; false (IF::RubyIO#print is not a copy operator)
414
- dest.close
415
- </pre>
416
- <h4>The Exception</h4>
417
- <p>
418
- When a block is passed directly to the rio constructor <tt>closeoncopy</tt>
419
- is turned off.
420
- </p>
421
- <pre>
422
- rio('afile') { |file|
423
- file.closeoncopy? #=&gt; false
424
- file &lt; a_string
425
- file.closed? #=&gt; false
426
- }
427
- # The file is now closed. See IF::GrandeStream#rio for more informatioin
428
- </pre>
429
- <h4>Why?</h4>
430
- <p>
431
- Some of my favorite Rio idioms are its copy one-liners
432
- </p>
433
- <pre>
434
- rio('afile') &lt; a_string # put a string into a file
435
- rio('afile') &lt; an_array # put an array into a file
436
- rio('afile') &lt; rio('anotherfile').lines(0..9) # copy the first 10 lines of anotherfile into afile
437
- rio('afile.gz').gzip &lt; rio('anotherfile').lines(0..9) # same thing into a gzipped file
438
- </pre>
439
- <p>
440
- In each of these cases, &#8216;afile&#8217; would remain open after the
441
- copy and furthermore since the destination Rio was not saved in a variable,
442
- There is no way to close file. Without closeoncopy Something like this
443
- would be required:
444
- </p>
445
- <pre>
446
- ario = rio('afile')
447
- ario &lt; something_else
448
- ario.close
449
- </pre>
450
- <p>
451
- Or this&#8230;
452
- </p>
453
- <pre>
454
- ario = rio('afile') &lt; something_else
455
- ario.close
456
- </pre>
457
- <p>
458
- Or this&#8230;
459
- </p>
460
- <pre>
461
- (rio('afile') &lt; something_else).close
462
- </pre>
463
- <p>
464
- One line, but ugly, and prone to error.
465
- </p>
466
- <p>
467
- What I want is this:
468
- </p>
469
- <pre>
470
- rio('afile') &lt; something_else
471
- </pre>
472
- <p>
473
- Simple. I want to copy this to that, I point the arrow and it works.
474
- </p>
475
- <p>
476
- In perl the rio&#8217;s destructor would be called, because there are no
477
- remaining references to the Rio However, it my understanding and experience
478
- that in Ruby the finalizer will not necessarily be called at this point.
479
- </p>
480
- </div>
481
- </div>
482
-
483
- <div id="method-M000098" class="method-detail">
484
- <a name="M000098"></a>
485
-
486
- <div class="method-heading">
487
- <a href="GrandeStream.src/M000098.html" target="Code" class="method-signature"
488
- onclick="popupCode('GrandeStream.src/M000098.html');return false;">
489
- <span class="method-name">closeoncopy?</span><span class="method-args">()</span>
490
- </a>
491
- </div>
492
-
493
- <div class="method-description">
494
- <p>
495
- Query a Rio&#8217;s closeoncopy mode
496
- </p>
497
- <pre>
498
- ario.closeoncopy? =&gt; true or false
499
- </pre>
500
- <p>
501
- See <a href="GrandeStream.html#M000096">closeoncopy</a>
502
- </p>
503
- </div>
504
- </div>
505
-
506
- <div id="method-M000093" class="method-detail">
507
- <a name="M000093"></a>
508
-
509
- <div class="method-heading">
510
- <a href="GrandeStream.src/M000093.html" target="Code" class="method-signature"
511
- onclick="popupCode('GrandeStream.src/M000093.html');return false;">
512
- <span class="method-name">closeoneof</span><span class="method-args">(arg=true,&amp;block)</span>
513
- </a>
514
- </div>
515
-
516
- <div class="method-description">
517
- <p>
518
- Set the Rio&#8217;s closeoneof mode.
519
- </p>
520
- <pre>
521
- ario.closeoneof(&amp;block) =&gt; ario
522
- </pre>
523
- <p>
524
- <tt>closeoneof</tt> causes a Rio to be closed automatically whenever the
525
- end of file is reached. This affects# all methods that read from a rio (<a
526
- href="RubyIO.html#M000012">readlines</a>, #to_a, <a
527
- href="Grande.html#M000054">each</a> <a href="RubyIO.html#M000004">gets</a>
528
- etc.) Because <tt>closeoneof</tt> must be on for many of Rio&#8217;s most
529
- useful idioms, it is on by default. <tt>closeoneof</tt> can be turned off
530
- using <a href="GrandeStream.html#M000094">nocloseoneof</a>.
531
- </p>
532
- <p>
533
- If a block is given behaves like <tt>ario.closeoneof.each(&amp;block)</tt>
534
- had been called
535
- </p>
536
- <p>
537
- Returns the Rio
538
- </p>
539
- <pre>
540
- ario = rio('afile')
541
- lines = ario.readlines
542
- ario.closed? #=&gt; true
543
-
544
- ario = rio('afile').nocloseoneof
545
- lines = ario.readlines
546
- ario.closed? #=&gt; false
547
- ario.close # must be explicitly closed
548
- </pre>
549
- <p>
550
- <tt>closeoneof</tt> is ignored by directory Rios, however, setting it on a
551
- directory Rio causes each file Rio returned while iterating to inherit the
552
- directory&#8217;s setting
553
- </p>
554
- <pre>
555
- rio('adir').files do |file|
556
- file.closeoneof? #=&gt; true
557
- end
558
-
559
- rio('adir').files.nocloseoneof do |file|
560
- file.closeoneof? #=&gt; false
561
- end
562
-
563
- rio('adir').files.nocloseoneof['*.rb'] # array of .rb file Rios in adir with closeoneof off
564
-
565
- drio = rio('adir').files
566
- frio1 = drio.read
567
- frio1.closeoneof? #=&gt; true
568
- drio.nocloseoneof
569
- frio2 = drio.read
570
- frio2.closeoneof? #=&gt; false
571
- </pre>
572
- </div>
573
- </div>
574
-
575
- <div id="method-M000095" class="method-detail">
576
- <a name="M000095"></a>
577
-
578
- <div class="method-heading">
579
- <a href="GrandeStream.src/M000095.html" target="Code" class="method-signature"
580
- onclick="popupCode('GrandeStream.src/M000095.html');return false;">
581
- <span class="method-name">closeoneof?</span><span class="method-args">()</span>
582
- </a>
583
- </div>
584
-
585
- <div class="method-description">
586
- <p>
587
- Query a Rio&#8217;s closeoneof mode
588
- </p>
589
- <pre>
590
- ario.closeoneof? =&gt; true or false
591
- </pre>
592
- <p>
593
- See <a href="GrandeStream.html#M000093">closeoneof</a> and <a
594
- href="GrandeStream.html#M000094">nocloseoneof</a>
595
- </p>
596
- <pre>
597
- ario = rio('afile')
598
- ario.closeoneof? #=&gt; true
599
- lines = ario.to_a
600
- ario.closed? #=&gt; true
601
-
602
- ario = rio('afile').nocloseoneof
603
- ario.closeoneof? #=&gt; false
604
- lines = ario.to_a
605
- ario.closed? #=&gt; false
606
- ario.close # must be explicitly closed
607
- </pre>
608
- </div>
609
- </div>
610
-
611
- <div id="method-M000084" class="method-detail">
612
- <a name="M000084"></a>
613
-
614
- <div class="method-heading">
615
- <a href="GrandeStream.src/M000084.html" target="Code" class="method-signature"
616
- onclick="popupCode('GrandeStream.src/M000084.html');return false;">
617
- <span class="method-name">contents</span><span class="method-args">()</span>
618
- </a>
619
- </div>
620
-
621
- <div class="method-description">
622
- <p>
623
- Slurps the contents of the rio into a string.
624
- </p>
625
- <pre>
626
- astring = rio('afile.txt').contents # slurp the entire contents of afile.txt into astring
627
- </pre>
628
- </div>
629
- </div>
630
-
631
- <div id="method-M000083" class="method-detail">
632
- <a name="M000083"></a>
633
-
634
- <div class="method-heading">
635
- <a href="GrandeStream.src/M000083.html" target="Code" class="method-signature"
636
- onclick="popupCode('GrandeStream.src/M000083.html');return false;">
637
- <span class="method-name">getline</span><span class="method-args">()</span>
638
- </a>
639
- </div>
640
-
641
- <div class="method-description">
642
- <p>
643
- Temporarily set the Rio to read lines, and call <a
644
- href="Grande.html#M000067">get</a>
645
- </p>
646
- <p>
647
- See also <a href="GrandeStream.html#M000076">records</a>, <a
648
- href="GrandeStream.html#M000074">lines</a>, <a
649
- href="Grande.html#M000054">each</a>, <a href="Grande.html#M000053">[]</a>
650
- </p>
651
- </div>
652
- </div>
653
-
654
- <div id="method-M000081" class="method-detail">
655
- <a name="M000081"></a>
656
-
657
- <div class="method-heading">
658
- <a href="GrandeStream.src/M000081.html" target="Code" class="method-signature"
659
- onclick="popupCode('GrandeStream.src/M000081.html');return false;">
660
- <span class="method-name">getrec</span><span class="method-args">()</span>
661
- </a>
662
- </div>
663
-
664
- <div class="method-description">
665
- <p>
666
- Temporarily set the Rio to read records, and call <a
667
- href="Grande.html#M000067">get</a>
668
- </p>
669
- <p>
670
- See also <a href="GrandeStream.html#M000076">records</a>, <a
671
- href="GrandeStream.html#M000074">lines</a>, <a
672
- href="Grande.html#M000054">each</a>, <a href="Grande.html#M000053">[]</a>
673
- </p>
674
- </div>
675
- </div>
676
-
677
- <div id="method-M000082" class="method-detail">
678
- <a name="M000082"></a>
679
-
680
- <div class="method-heading">
681
- <a href="GrandeStream.src/M000082.html" target="Code" class="method-signature"
682
- onclick="popupCode('GrandeStream.src/M000082.html');return false;">
683
- <span class="method-name">getrow</span><span class="method-args">()</span>
684
- </a>
685
- </div>
686
-
687
- <div class="method-description">
688
- <p>
689
- Temporarily set the Rio to read rows, and call <a
690
- href="Grande.html#M000067">get</a>
691
- </p>
692
- <p>
693
- See also <a href="GrandeStream.html#M000079">rows</a>, <a
694
- href="GrandeStream.html#M000074">lines</a>, <a
695
- href="Grande.html#M000054">each</a>, <a href="Grande.html#M000053">[]</a>
696
- </p>
697
- </div>
698
- </div>
699
-
700
- <div id="method-M000104" class="method-detail">
701
- <a name="M000104"></a>
702
-
703
- <div class="method-heading">
704
- <a href="GrandeStream.src/M000104.html" target="Code" class="method-signature"
705
- onclick="popupCode('GrandeStream.src/M000104.html');return false;">
706
- <span class="method-name">gzip</span><span class="method-args">(&amp;block)</span>
707
- </a>
708
- </div>
709
-
710
- <div class="method-description">
711
- <p>
712
- Sets the Rio to gzip mode.
713
- </p>
714
- <pre>
715
- ario.gzip #=&gt; ario
716
- </pre>
717
- <p>
718
- If applied to a Rio that is being read from Reads through a
719
- <tt>Zlib::GzipReader</tt>; If applied to a Rio that is being written to
720
- writes through a <tt>Zlib::GzipWriter</tt>.
721
- </p>
722
- <p>
723
- Returns the Rio
724
- </p>
725
- <p>
726
- If a block is given, acts like <tt>ario.gzip.each(&amp;block)</tt>
727
- </p>
728
- <pre>
729
- rio('afile') &gt; rio('afile.gz').gzip # gzip a file
730
- rio('afile.gz').gzip &lt; rio('afile') # same thing
731
-
732
- rio('afile.gz').gzip &gt; rio('afile') # ungzip a file
733
- rio('afile') &lt; rio('afile.gz').gzip # same thing
734
-
735
- rio('afile.gz').gzip.chomp { |line| ...} # process each chomped line of a gzipped file
736
- rio('afile.gz').gzip[0..9] # an array containing the first 10 lines of a gzipped file
737
- </pre>
738
- </div>
739
- </div>
740
-
741
- <div id="method-M000105" class="method-detail">
742
- <a name="M000105"></a>
743
-
744
- <div class="method-heading">
745
- <a href="GrandeStream.src/M000105.html" target="Code" class="method-signature"
746
- onclick="popupCode('GrandeStream.src/M000105.html');return false;">
747
- <span class="method-name">gzip?</span><span class="method-args">()</span>
748
- </a>
749
- </div>
750
-
751
- <div class="method-description">
752
- <p>
753
- Queries the Rio&#8217;s gzip-mode
754
- </p>
755
- <pre>
756
- ario.gzip? #=&gt; true or false
757
- </pre>
758
- <p>
759
- See <a href="GrandeStream.html#M000104">gzip</a>
760
- </p>
761
- </div>
762
- </div>
763
-
764
- <div id="method-M000071" class="method-detail">
765
- <a name="M000071"></a>
766
-
767
- <div class="method-heading">
768
- <a href="GrandeStream.src/M000071.html" target="Code" class="method-signature"
769
- onclick="popupCode('GrandeStream.src/M000071.html');return false;">
770
- <span class="method-name">line</span><span class="method-args">(*args,&amp;block)</span>
771
- </a>
772
- </div>
773
-
774
- <div class="method-description">
775
- <p>
776
- Calls <a href="GrandeStream.html#M000074">lines</a>(*args) but when used
777
- with the subscript operator returns the first element of the returned array
778
- instead of the array.
779
- </p>
780
- <p>
781
- If afile contains [&quot;line 0\n&quot;,&quot;line 1\n&quot;]
782
- </p>
783
- <pre>
784
- rio('afile').line[0] #=&gt; &quot;line 0\n&quot;
785
- rio('afile').line[1] #=&gt; &quot;line 1\n&quot;
786
- rio('afile').lines[0] #=&gt; [&quot;line 0\n&quot;]
787
- rio('afile').lines[1] #=&gt; [&quot;line 1\n&quot;]
788
- rio('afile').lines[0][0] #=&gt; &quot;line 0\n&quot;
789
- rio('afile').lines[1][0] #=&gt; &quot;line 1\n&quot;
790
- </pre>
791
- </div>
792
- </div>
793
-
794
- <div id="method-M000074" class="method-detail">
795
- <a name="M000074"></a>
796
-
797
- <div class="method-heading">
798
- <a href="GrandeStream.src/M000074.html" target="Code" class="method-signature"
799
- onclick="popupCode('GrandeStream.src/M000074.html');return false;">
800
- <span class="method-name">lines</span><span class="method-args">(*args,&amp;block)</span>
801
- </a>
802
- </div>
803
-
804
- <div class="method-description">
805
- <p>
806
- Sets the rio to read lines and returns the Rio
807
- </p>
808
- <p>
809
- If called with a block behaves as if <tt>lines(*args).each(&amp;block)</tt>
810
- had been called
811
- </p>
812
- <p>
813
- <tt>lines</tt> returns the Rio which called it. This might seem
814
- counter-intuitive at first. One might reasonably assume that
815
- </p>
816
- <pre>
817
- rio('adir').lines(0..10)
818
- </pre>
819
- <p>
820
- would return lines. It does not. It configures the rio to return lines and
821
- returns the Rio. This enables chaining for further configuration so
822
- constructs like
823
- </p>
824
- <pre>
825
- rio('afile').lines(0..10).skiplines(/::/)
826
- </pre>
827
- <p>
828
- are possible.
829
- </p>
830
- <p>
831
- If args are provided they may be one or more of the following:
832
- </p>
833
- <table>
834
- <tr><td valign="top">Regexp:</td><td>any matching record will be processed
835
-
836
- </td></tr>
837
- <tr><td valign="top">Range:</td><td>specifies a range of records (zero-based) to be included
838
-
839
- </td></tr>
840
- <tr><td valign="top">Integer:</td><td>interpreted as a one element range of lines to be processed
841
-
842
- </td></tr>
843
- <tr><td valign="top">Proc:</td><td>a proc which will be called for each record, records are included unless
844
- nil or false is returned
845
-
846
- </td></tr>
847
- <tr><td valign="top">Symbol:</td><td>a symbol which will <em>sent</em> to each record, records are included
848
- unless nil or false is returned
849
-
850
- </td></tr>
851
- <tr><td valign="top">Array:</td><td>an array of other selectors. records are selected unless any of the matches
852
- fail.
853
-
854
- </td></tr>
855
- </table>
856
- <pre>
857
- rio('f.txt').lines(/^\s*#/) { |line| ... } # iterate over comment-only lines
858
- rio('f.txt').lines(/^\s*#/).each { |line| ... } # same as above
859
-
860
- rio('f.txt').lines(1,7..9) &gt; rio('anotherfile.txt') # copy lines 1,7,8 and 9 to anotherfile.txt
861
-
862
- rio('f.txt').lines(1...3).to_a # return an array containing lines 1 and 2 of f.txt
863
- rio('f.txt').lines[1...3] # same thing
864
- </pre>
865
- </div>
866
- </div>
867
-
868
- <div id="method-M000099" class="method-detail">
869
- <a name="M000099"></a>
870
-
871
- <div class="method-heading">
872
- <a href="GrandeStream.src/M000099.html" target="Code" class="method-signature"
873
- onclick="popupCode('GrandeStream.src/M000099.html');return false;">
874
- <span class="method-name">noautoclose</span><span class="method-args">(arg=false,&amp;block)</span>
875
- </a>
876
- </div>
877
-
878
- <div class="method-description">
879
- <p>
880
- Turns off both closeoneof and closeoncopy. Equivelent to:
881
- </p>
882
- <pre>
883
- ario.nocloseoneof.nocloseoncopy
884
- </pre>
885
- <p>
886
- Returns the Rio
887
- </p>
888
- <pre>
889
- ario.noautoclose(&amp;block) =&gt; ario
890
- </pre>
891
- <p>
892
- If a block is given, acts as if
893
- </p>
894
- <pre>
895
- ario.noautoclose.each(&amp;block)
896
- </pre>
897
- <p>
898
- had been called.
899
- </p>
900
- <p>
901
- See <a href="GrandeStream.html#M000094">nocloseoneof</a> and <a
902
- href="GrandeStream.html#M000097">nocloseoncopy</a>
903
- </p>
904
- </div>
905
- </div>
906
-
907
- <div id="method-M000097" class="method-detail">
908
- <a name="M000097"></a>
909
-
910
- <div class="method-heading">
911
- <a href="GrandeStream.src/M000097.html" target="Code" class="method-signature"
912
- onclick="popupCode('GrandeStream.src/M000097.html');return false;">
913
- <span class="method-name">nocloseoncopy</span><span class="method-args">(arg=false,&amp;block)</span>
914
- </a>
915
- </div>
916
-
917
- <div class="method-description">
918
- <p>
919
- Set a Rio&#8217;s closeoncopy mode to false
920
- </p>
921
- <pre>
922
- ario.nocloseoncopy(&amp;block) =&gt; ario
923
- </pre>
924
- <p>
925
- See <a href="GrandeStream.html#M000096">closeoncopy</a>
926
- </p>
927
- </div>
928
- </div>
929
-
930
- <div id="method-M000094" class="method-detail">
931
- <a name="M000094"></a>
932
-
933
- <div class="method-heading">
934
- <a href="GrandeStream.src/M000094.html" target="Code" class="method-signature"
935
- onclick="popupCode('GrandeStream.src/M000094.html');return false;">
936
- <span class="method-name">nocloseoneof</span><span class="method-args">(arg=false,&amp;block)</span>
937
- </a>
938
- </div>
939
-
940
- <div class="method-description">
941
- <p>
942
- Set the Rio&#8217;s closeoneof mode to false
943
- </p>
944
- <pre>
945
- ario.nocloseoneof(&amp;block) =&gt; ario
946
- </pre>
947
- <p>
948
- See <a href="GrandeStream.html#M000093">closeoneof</a>
949
- </p>
950
- <p>
951
- If a block is given behaves like
952
- </p>
953
- <pre>
954
- ario.nocloseoneof.each(&amp;block)
955
- </pre>
956
- <p>
957
- Returns the Rio
958
- </p>
959
- <pre>
960
- ario = rio('afile')
961
- lines = ario.to_a
962
- ario.closed? #=&gt; true
963
-
964
- ario = rio('afile').nocloseoneof
965
- lines = ario.to_a
966
- ario.closed? #=&gt; false
967
- ario.close # must be explicitly closed
968
- </pre>
969
- </div>
970
- </div>
971
-
972
- <div id="method-M000085" class="method-detail">
973
- <a name="M000085"></a>
974
-
975
- <div class="method-heading">
976
- <a href="GrandeStream.src/M000085.html" target="Code" class="method-signature"
977
- onclick="popupCode('GrandeStream.src/M000085.html');return false;">
978
- <span class="method-name">putrec</span><span class="method-args">(el)</span>
979
- </a>
980
- </div>
981
-
982
- <div class="method-description">
983
- <p>
984
- Writes a single record to a Rio
985
- </p>
986
- </div>
987
- </div>
988
-
989
- <div id="method-M000089" class="method-detail">
990
- <a name="M000089"></a>
991
-
992
- <div class="method-heading">
993
- <a href="GrandeStream.src/M000089.html" target="Code" class="method-signature"
994
- onclick="popupCode('GrandeStream.src/M000089.html');return false;">
995
- <span class="method-name">r</span><span class="method-args">()</span>
996
- </a>
997
- </div>
998
-
999
- <div class="method-description">
1000
- <p>
1001
- Sets the implicit input mode to &#8216;r&#8217;.
1002
- </p>
1003
- <p>
1004
- The implicit input mode is the mode Rio will use for input when no mode is
1005
- specified.
1006
- </p>
1007
- <p>
1008
- Returns the Rio
1009
- </p>
1010
- <p>
1011
- See the discussion for <a href="GrandeStream.html#M000086">a</a>.
1012
- </p>
1013
- <p>
1014
- Since &#8216;r&#8217; is the implicit input mode used by default, this
1015
- method is probably uneeded.
1016
- </p>
1017
- </div>
1018
- </div>
1019
-
1020
- <div id="method-M000090" class="method-detail">
1021
- <a name="M000090"></a>
1022
-
1023
- <div class="method-heading">
1024
- <a href="GrandeStream.src/M000090.html" target="Code" class="method-signature"
1025
- onclick="popupCode('GrandeStream.src/M000090.html');return false;">
1026
- <span class="method-name">r!</span><span class="method-args">()</span>
1027
- </a>
1028
- </div>
1029
-
1030
- <div class="method-description">
1031
- <p>
1032
- Sets the implicit input mode to &#8216;r+&#8217;.
1033
- </p>
1034
- <p>
1035
- The implicit input mode is the mode Rio will use for input when no mode is
1036
- specified.
1037
- </p>
1038
- <p>
1039
- Returns the Rio
1040
- </p>
1041
- <p>
1042
- See the discussion for <a href="GrandeStream.html#M000086">a</a>.
1043
- </p>
1044
- </div>
1045
- </div>
1046
-
1047
- <div id="method-M000072" class="method-detail">
1048
- <a name="M000072"></a>
1049
-
1050
- <div class="method-heading">
1051
- <a href="GrandeStream.src/M000072.html" target="Code" class="method-signature"
1052
- onclick="popupCode('GrandeStream.src/M000072.html');return false;">
1053
- <span class="method-name">record</span><span class="method-args">(*args,&amp;block)</span>
1054
- </a>
1055
- </div>
1056
-
1057
- <div class="method-description">
1058
- <p>
1059
- See <a href="GrandeStream.html#M000071">line</a>.
1060
- </p>
1061
- </div>
1062
- </div>
1063
-
1064
- <div id="method-M000076" class="method-detail">
1065
- <a name="M000076"></a>
1066
-
1067
- <div class="method-heading">
1068
- <a href="GrandeStream.src/M000076.html" target="Code" class="method-signature"
1069
- onclick="popupCode('GrandeStream.src/M000076.html');return false;">
1070
- <span class="method-name">records</span><span class="method-args">(*args,&amp;block)</span>
1071
- </a>
1072
- </div>
1073
-
1074
- <div class="method-description">
1075
- <p>
1076
- Specifies which records will be iterated through by <a
1077
- href="Grande.html#M000054">each</a> or returned by <a
1078
- href="GrandeStream.html#M000081">getrec</a>
1079
- </p>
1080
- <p>
1081
- If called with a block behaves as if
1082
- <tt>records(*args).each(&amp;block)</tt> had been called
1083
- </p>
1084
- <p>
1085
- Returns the Rio
1086
- </p>
1087
- <p>
1088
- If no args are provided, all records are selected. What constitutes a
1089
- record is affected by <a href="GrandeStream.html#M000074">lines</a>,<a
1090
- href="GrandeStream.html#M000075">bytes</a>, and extensions such as <a
1091
- href="CSV.html#M000129">csv</a> and <a href="YAML.html#M000164">yaml</a>.
1092
- </p>
1093
- <p>
1094
- If args are provided they may be one or more of the following:
1095
- </p>
1096
- <table>
1097
- <tr><td valign="top">Regexp:</td><td>any matching record will be iterated over by <a
1098
- href="Grande.html#M000054">each</a> or returned by <a
1099
- href="GrandeStream.html#M000081">getrec</a>
1100
-
1101
- </td></tr>
1102
- <tr><td valign="top">Integer:</td><td>specifies a record-number (zero-based) to be iterated over by <a
1103
- href="Grande.html#M000054">each</a> or returned by <a
1104
- href="GrandeStream.html#M000081">getrec</a>
1105
-
1106
- </td></tr>
1107
- <tr><td valign="top">Range:</td><td>specifies a range of records (zero-based) to included in the iteration
1108
-
1109
- </td></tr>
1110
- <tr><td valign="top">Proc:</td><td>a proc which will be called for each record, records are included unless
1111
- nil or false is returned
1112
-
1113
- </td></tr>
1114
- <tr><td valign="top">Symbol:</td><td>a symbol which will <em>sent</em> to each record, records are included
1115
- unless nil or false is returned
1116
-
1117
- </td></tr>
1118
- <tr><td valign="top">Array:</td><td>an array of any of above. All must match for a line to be included
1119
-
1120
- </td></tr>
1121
- </table>
1122
- <p>
1123
- Any other argument type is compared with the record using its <tt>===</tt>
1124
- method.
1125
- </p>
1126
- <p>
1127
- If the argument is a ::Proc it may be called with one, two or three
1128
- paramaters.
1129
- </p>
1130
- <ol>
1131
- <li>the record
1132
-
1133
- </li>
1134
- <li>the recno (optional)
1135
-
1136
- </li>
1137
- <li>the rio (optional)
1138
-
1139
- </li>
1140
- </ol>
1141
- <p>
1142
- Note in the following examples that since <tt>lines</tt> is the default
1143
- <tt>ario.records(*args)</tt> is effectively the same as
1144
- <tt>ario.lines(*args)</tt>.
1145
- </p>
1146
- <pre>
1147
- rio('afile').records(0) { |line| ... } # iterate over the first line of 'afile'
1148
- rio('afile').records(0,5..7)) { |line| ... } # iterate over lines 0,5,6 and 7
1149
- rio('afile').records(/Zippy/) { |line| ... } # iterate over all lines containing 'Zippy'
1150
-
1151
- rio('f.csv').puts!([&quot;h0,h1&quot;,&quot;f0,f1&quot;]) # Create f.csv
1152
-
1153
- rio('f.csv').csv.records[] #==&gt;[[&quot;h0&quot;, &quot;h1&quot;], [&quot;f0&quot;, &quot;f1&quot;]]
1154
- rio('f.csv').csv.lines[] #==&gt;[&quot;h0,h1\n&quot;, &quot;f0,f1\n&quot;]
1155
- rio('f.csv').csv.records[0] #==&gt;[[&quot;h0&quot;, &quot;h1&quot;]]
1156
- </pre>
1157
- </div>
1158
- </div>
1159
-
1160
- <div id="method-M000073" class="method-detail">
1161
- <a name="M000073"></a>
1162
-
1163
- <div class="method-heading">
1164
- <a href="GrandeStream.src/M000073.html" target="Code" class="method-signature"
1165
- onclick="popupCode('GrandeStream.src/M000073.html');return false;">
1166
- <span class="method-name">row</span><span class="method-args">(*args,&amp;block)</span>
1167
- </a>
1168
- </div>
1169
-
1170
- <div class="method-description">
1171
- <p>
1172
- See <a href="GrandeStream.html#M000071">line</a>.
1173
- </p>
1174
- </div>
1175
- </div>
1176
-
1177
- <div id="method-M000079" class="method-detail">
1178
- <a name="M000079"></a>
1179
-
1180
- <div class="method-heading">
1181
- <a href="GrandeStream.src/M000079.html" target="Code" class="method-signature"
1182
- onclick="popupCode('GrandeStream.src/M000079.html');return false;">
1183
- <span class="method-name">rows</span><span class="method-args">(*args,&amp;block)</span>
1184
- </a>
1185
- </div>
1186
-
1187
- <div class="method-description">
1188
- <p>
1189
- Sets the Rio to read rows and specifies rows which should be iterated
1190
- through by <a href="Grande.html#M000054">each</a> or returned by <a
1191
- href="GrandeStream.html#M000081">getrec</a>. <a
1192
- href="GrandeStream.html#M000079">rows</a> is intended for use by
1193
- extensions, where the concept of a row is reasonable. In the absensence of
1194
- an extension behaves like <a href="GrandeStream.html#M000076">records</a>.
1195
- </p>
1196
- </div>
1197
- </div>
1198
-
1199
- <div id="method-M000078" class="method-detail">
1200
- <a name="M000078"></a>
1201
-
1202
- <div class="method-heading">
1203
- <a href="GrandeStream.src/M000078.html" target="Code" class="method-signature"
1204
- onclick="popupCode('GrandeStream.src/M000078.html');return false;">
1205
- <span class="method-name">skiplines</span><span class="method-args">(*args,&amp;block)</span>
1206
- </a>
1207
- </div>
1208
-
1209
- <div class="method-description">
1210
- <p>
1211
- Sets the Rio to read lines and specifies lines which should <b>not</b> be
1212
- iterated through by <a href="Grande.html#M000054">each</a> or returned by
1213
- <a href="GrandeStream.html#M000081">getrec</a>
1214
- </p>
1215
- <p>
1216
- If called with a block behaves as if
1217
- <tt>skiplines(*args).each(&amp;block)</tt> had been called
1218
- </p>
1219
- <p>
1220
- Returns the Rio
1221
- </p>
1222
- <p>
1223
- See also <a href="GrandeStream.html#M000074">lines</a>, <a
1224
- href="GrandeStream.html#M000076">records</a>, <a
1225
- href="Grande.html#M000068">skip</a>
1226
- </p>
1227
- <p>
1228
- If no args are provided, no lines are rejected.
1229
- </p>
1230
- <p>
1231
- If args are provided they may be one or more of the following:
1232
- </p>
1233
- <table>
1234
- <tr><td valign="top">Regexp:</td><td>any matching line will not be processed
1235
-
1236
- </td></tr>
1237
- <tr><td valign="top">Integer:</td><td>specifies a line-number (zero-based) to be skipped
1238
-
1239
- </td></tr>
1240
- <tr><td valign="top">Range:</td><td>specifies a range of lines (zero-based) to be excluded
1241
-
1242
- </td></tr>
1243
- <tr><td valign="top">Proc:</td><td>a proc which will be called for each line, lines are excluded unless nil or
1244
- false is returned
1245
-
1246
- </td></tr>
1247
- <tr><td valign="top">Symbol:</td><td>a symbol which will <em>sent</em> to each line, lines are excluded unless
1248
- nil or false is returned
1249
-
1250
- </td></tr>
1251
- <tr><td valign="top">Array:</td><td>an array of any of above. All must match for a line to be included
1252
-
1253
- </td></tr>
1254
- </table>
1255
- <pre>
1256
- rio('afile').skiplines(0) { |line| ... } # iterate over all but the first line of 'afile'
1257
- rio('afile').skiplines(0,5..7)) { |line| ... } # don't iterate over lines 0,5,6 and 7
1258
- rio('afile').skiplines(/Zippy/) { |line| ... } # skip all lines containing 'Zippy'
1259
- rio('afile').chomp.skiplines(:empty?) { |line| ... } # skip empty lines
1260
- </pre>
1261
- </div>
1262
- </div>
1263
-
1264
- <div id="method-M000077" class="method-detail">
1265
- <a name="M000077"></a>
1266
-
1267
- <div class="method-heading">
1268
- <a href="GrandeStream.src/M000077.html" target="Code" class="method-signature"
1269
- onclick="popupCode('GrandeStream.src/M000077.html');return false;">
1270
- <span class="method-name">skiprecords</span><span class="method-args">(*args,&amp;block)</span>
1271
- </a>
1272
- </div>
1273
-
1274
- <div class="method-description">
1275
- <p>
1276
- Specifies records which should <b>not</b> be iterated through by <a
1277
- href="Grande.html#M000054">each</a> or returned by <a
1278
- href="GrandeStream.html#M000081">getrec</a>
1279
- </p>
1280
- <p>
1281
- If called with a block behaves as if
1282
- <tt>skiprecords(*args).each(&amp;block)</tt> had been called
1283
- </p>
1284
- <p>
1285
- Returns the Rio
1286
- </p>
1287
- <p>
1288
- See also <a href="GrandeStream.html#M000076">records</a>, <a
1289
- href="GrandeStream.html#M000078">skiplines</a>, <a
1290
- href="GrandeStream.html#M000074">lines</a>, <a
1291
- href="Grande.html#M000068">skip</a>
1292
- </p>
1293
- <p>
1294
- If no args are provided, no records are rejected. What constitutes a record
1295
- is affected by <a href="GrandeStream.html#M000074">lines</a>,<a
1296
- href="GrandeStream.html#M000075">bytes</a>, and extensions such as <a
1297
- href="CSV.html#M000129">csv</a> and <a href="YAML.html#M000164">yaml</a>.
1298
- </p>
1299
- <p>
1300
- If args are provided they may be one or more of the following:
1301
- </p>
1302
- <table>
1303
- <tr><td valign="top">Regexp:</td><td>any matching record will not be processed
1304
-
1305
- </td></tr>
1306
- <tr><td valign="top">Integer:</td><td>specifies a record-number (zero-based) to be skipped
1307
-
1308
- </td></tr>
1309
- <tr><td valign="top">Range:</td><td>specifies a range of records (zero-based) to be excluded
1310
-
1311
- </td></tr>
1312
- <tr><td valign="top">Proc:</td><td>a proc which will be called for each record, records are excluded unless
1313
- nil or false is returned
1314
-
1315
- </td></tr>
1316
- <tr><td valign="top">Symbol:</td><td>a symbol which will <em>sent</em> to each record, records are excluded
1317
- unless nil or false is returned
1318
-
1319
- </td></tr>
1320
- <tr><td valign="top">Array:</td><td>an array of any of the above, all of which must match for the array to
1321
- match.
1322
-
1323
- </td></tr>
1324
- </table>
1325
- <p>
1326
- Note in the following examples that since <tt>lines</tt> is the default
1327
- record type <tt>ario.skiprecords(*args)</tt> is effectively the same as
1328
- <tt>ario.skiplines(*args)</tt>.
1329
- </p>
1330
- <pre>
1331
- rio('afile').skiprecords(0) { |line| ... } # iterate over all but the first line of 'afile'
1332
- rio('afile').skiprecords(0,5..7)) { |line| ... } # don't iterate over lines 0,5,6 and 7
1333
- rio('afile').skiprecords(/Zippy/) { |line| ... } # skip all lines containing 'Zippy'
1334
- rio('afile').chomp.skiplines(:empty?) { |line| ... } # skip empty lines
1335
- </pre>
1336
- </div>
1337
- </div>
1338
-
1339
- <div id="method-M000080" class="method-detail">
1340
- <a name="M000080"></a>
1341
-
1342
- <div class="method-heading">
1343
- <a href="GrandeStream.src/M000080.html" target="Code" class="method-signature"
1344
- onclick="popupCode('GrandeStream.src/M000080.html');return false;">
1345
- <span class="method-name">skiprows</span><span class="method-args">(*args,&amp;block)</span>
1346
- </a>
1347
- </div>
1348
-
1349
- <div class="method-description">
1350
- <p>
1351
- Sets the Rio to read rows and specifies lines which should <b>not</b> be
1352
- iterated through by <a href="Grande.html#M000054">each</a> or returned by
1353
- <a href="GrandeStream.html#M000081">getrec</a> <a
1354
- href="GrandeStream.html#M000080">skiprows</a> is intended for use by
1355
- extensions, where the concept of a row is reasonable. In the absence of an
1356
- extension behaves like <a href="GrandeStream.html#M000077">skiprecords</a>
1357
- </p>
1358
- </div>
1359
- </div>
1360
-
1361
- <div id="method-M000106" class="method-detail">
1362
- <a name="M000106"></a>
1363
-
1364
- <div class="method-heading">
1365
- <a href="GrandeStream.src/M000106.html" target="Code" class="method-signature"
1366
- onclick="popupCode('GrandeStream.src/M000106.html');return false;">
1367
- <span class="method-name">splitlines</span><span class="method-args">(*args,&amp;block)</span>
1368
- </a>
1369
- </div>
1370
-
1371
- <div class="method-description">
1372
- <p>
1373
- This causes String#split(arg) to be called on every line before it is
1374
- returned. An array of the split lines is returned when iterating
1375
- </p>
1376
- <pre>
1377
- rio('/etc/passwd').split(':').columns(0,2) { |ary|
1378
- username,uid = ary
1379
- }
1380
-
1381
- rio('/etc/passwd').split(':').columns(0,2).to_a #=&gt; [[user1,uid1],[user2,uid2]]
1382
- </pre>
1383
- <p>
1384
- See also <a href="Grande.html#M000070">split</a>
1385
- </p>
1386
- </div>
1387
- </div>
1388
-
1389
- <div id="method-M000103" class="method-detail">
1390
- <a name="M000103"></a>
1391
-
1392
- <div class="method-heading">
1393
- <a href="GrandeStream.src/M000103.html" target="Code" class="method-signature"
1394
- onclick="popupCode('GrandeStream.src/M000103.html');return false;">
1395
- <span class="method-name">strip</span><span class="method-args">(arg=true,&amp;block)</span>
1396
- </a>
1397
- </div>
1398
-
1399
- <div class="method-description">
1400
- <p>
1401
- Sets the Rio to strip lines and returns the Rio
1402
- </p>
1403
- <p>
1404
- When called with a block, behaves as if strip.each(&amp;block) had been
1405
- called
1406
- </p>
1407
- <p>
1408
- <tt>strip</tt> causes lines returned by each, to_a, readlines, readline,
1409
- gets, each_line etc. to be stripped with String#strip before iterated over
1410
- or assigned
1411
- </p>
1412
- <pre>
1413
- ans = rio(?-).print(&quot;A Prompt&gt; &quot;).strip.gets # prompt the user
1414
- </pre>
1415
- <p>
1416
- See also <a href="GrandeStream.html#M000101">chomp</a>
1417
- </p>
1418
- </div>
1419
- </div>
1420
-
1421
- <div id="method-M000102" class="method-detail">
1422
- <a name="M000102"></a>
1423
-
1424
- <div class="method-heading">
1425
- <a href="GrandeStream.src/M000102.html" target="Code" class="method-signature"
1426
- onclick="popupCode('GrandeStream.src/M000102.html');return false;">
1427
- <span class="method-name">strip?</span><span class="method-args">()</span>
1428
- </a>
1429
- </div>
1430
-
1431
- <div class="method-description">
1432
- <p>
1433
- Queries the Rio&#8217;s strip-mode. See <a
1434
- href="GrandeStream.html#M000103">strip</a>.
1435
- </p>
1436
- </div>
1437
- </div>
1438
-
1439
- <div id="method-M000091" class="method-detail">
1440
- <a name="M000091"></a>
1441
-
1442
- <div class="method-heading">
1443
- <a href="GrandeStream.src/M000091.html" target="Code" class="method-signature"
1444
- onclick="popupCode('GrandeStream.src/M000091.html');return false;">
1445
- <span class="method-name">w</span><span class="method-args">()</span>
1446
- </a>
1447
- </div>
1448
-
1449
- <div class="method-description">
1450
- <p>
1451
- Sets the implicit output mode to &#8216;w&#8217;.
1452
- </p>
1453
- <p>
1454
- The implicit output mode is the mode Rio will use for output when no mode
1455
- is specified.
1456
- </p>
1457
- <p>
1458
- Returns the Rio
1459
- </p>
1460
- <p>
1461
- See the discussion for <a href="GrandeStream.html#M000086">a</a>.
1462
- </p>
1463
- <p>
1464
- Since &#8216;w&#8217; is the implicit output mode used by default, this
1465
- method is uneeded, but is provided for completeness..
1466
- </p>
1467
- </div>
1468
- </div>
1469
-
1470
- <div id="method-M000092" class="method-detail">
1471
- <a name="M000092"></a>
1472
-
1473
- <div class="method-heading">
1474
- <a href="GrandeStream.src/M000092.html" target="Code" class="method-signature"
1475
- onclick="popupCode('GrandeStream.src/M000092.html');return false;">
1476
- <span class="method-name">w!</span><span class="method-args">()</span>
1477
- </a>
1478
- </div>
1479
-
1480
- <div class="method-description">
1481
- <p>
1482
- Sets the implicit output mode to &#8216;w+&#8217;.
1483
- </p>
1484
- <p>
1485
- The implicit output mode is the mode Rio will use for output when no mode
1486
- is specified.
1487
- </p>
1488
- <p>
1489
- Returns the Rio
1490
- </p>
1491
- <pre>
1492
- rio(?-,'cat').w!.puts!(&quot;Hello Kitty&quot;).readline #=&gt; &quot;Hello Kitty&quot;
1493
- </pre>
1494
- <p>
1495
- See the discussion for <a href="GrandeStream.html#M000086">a</a>.
1496
- </p>
1497
- </div>
1498
- </div>
1499
-
1500
-
1501
- </div>
1502
- </div>
1503
-
1504
-
1505
- </div>
1506
-
1507
-
1508
- <div id="validator-badges">
1509
- <p><small>Copyright &copy; 2005,2006,2007,2008 Christopher Kleckner. <a href="http://www.gnu.org/licenses/gpl.html">All rights reserved</a>.</small></p>
1510
- </div>
1511
-
1512
- </body>
1513
- </html>