rio 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. data/README +18 -12
  2. data/Rakefile +57 -87
  3. data/build_doc.rb +19 -17
  4. data/doc/ANNOUNCE +3 -32
  5. data/doc/RELEASE_NOTES +4 -5
  6. data/doc/RIOIS +215 -0
  7. data/doc/generators/template/html/rio.css +428 -0
  8. data/doc/generators/template/html/rio.rb +18 -389
  9. data/doc/generators/template/html/ugly.rb +130 -0
  10. data/doc/pkg_def.rb +66 -0
  11. data/ex/catcsv.rb +64 -0
  12. data/ex/colx.rb +8 -0
  13. data/ex/findinruby +15 -0
  14. data/ex/findruby +14 -0
  15. data/ex/passwd_report.rb +8 -0
  16. data/ex/prompt.rb +25 -0
  17. data/ex/rgb.txt.gz +0 -0
  18. data/ex/riocat +42 -0
  19. data/ex/riogunzip +31 -0
  20. data/ex/riogzip +24 -0
  21. data/ex/rioprompt.rb +10 -0
  22. data/ex/targz2zip +17 -0
  23. data/ex/tonl +10 -0
  24. data/lib/rio.rb +16 -10
  25. data/lib/rio/abstract_method.rb +3 -4
  26. data/lib/rio/argv.rb +3 -4
  27. data/lib/rio/arycopy.rb +3 -4
  28. data/lib/rio/assert.rb +3 -4
  29. data/lib/rio/base.rb +3 -4
  30. data/lib/rio/callstr.rb +3 -4
  31. data/lib/rio/const.rb +3 -4
  32. data/lib/rio/construct.rb +3 -4
  33. data/lib/rio/constructor.rb +12 -8
  34. data/lib/rio/context.rb +15 -30
  35. data/lib/rio/context/autoclose.rb +3 -4
  36. data/lib/rio/context/copying.rb +3 -4
  37. data/lib/rio/context/cxx.rb +3 -4
  38. data/lib/rio/context/dir.rb +3 -4
  39. data/lib/rio/context/gzip.rb +3 -4
  40. data/lib/rio/context/methods.rb +16 -5
  41. data/lib/rio/context/skip.rb +3 -4
  42. data/lib/rio/context/stream.rb +42 -5
  43. data/lib/rio/cp.rb +7 -7
  44. data/lib/rio/def.rb +3 -4
  45. data/lib/rio/dir.rb +3 -4
  46. data/lib/rio/doc.rb +4 -5
  47. data/lib/rio/doc/EXAMPLES.rb +299 -0
  48. data/lib/rio/doc/HOWTO.rb +3 -4
  49. data/lib/rio/doc/INTRO.rb +86 -105
  50. data/lib/rio/doc/OPTIONAL.rb +4 -5
  51. data/lib/rio/doc/SYNOPSIS.rb +7 -6
  52. data/lib/rio/entrysel.rb +21 -23
  53. data/lib/rio/exception.rb +3 -4
  54. data/lib/rio/exception/copy.rb +3 -4
  55. data/lib/rio/exception/notimplemented.rb +57 -0
  56. data/lib/rio/exception/notsupported.rb +3 -4
  57. data/lib/rio/exception/open.rb +3 -4
  58. data/lib/rio/exception/state.rb +3 -4
  59. data/lib/rio/ext.rb +47 -13
  60. data/lib/rio/ext/csv.rb +4 -5
  61. data/lib/rio/ext/if.rb +45 -0
  62. data/lib/rio/ext/mp3info.rb +80 -0
  63. data/lib/rio/ext/splitlines.rb +253 -0
  64. data/lib/rio/ext/yaml.rb +9 -5
  65. data/lib/rio/ext/yaml/doc.rb +133 -0
  66. data/lib/rio/ext/yaml/tie.rb +149 -0
  67. data/lib/rio/ext/zipfile.rb +23 -4
  68. data/lib/rio/ext/zipfile/fs.rb +116 -0
  69. data/lib/rio/ext/zipfile/rl.rb +251 -0
  70. data/lib/rio/ext/zipfile/rootdir.rb +117 -0
  71. data/lib/rio/ext/zipfile/state.rb +161 -0
  72. data/lib/rio/ext/zipfile/wrap.rb +204 -0
  73. data/lib/rio/factory.rb +235 -27
  74. data/lib/rio/file.rb +4 -4
  75. data/lib/rio/filter.rb +3 -4
  76. data/lib/rio/filter/closeoneof.rb +3 -4
  77. data/lib/rio/filter/gzip.rb +9 -4
  78. data/lib/rio/fs/base.rb +3 -4
  79. data/lib/rio/fs/impl.rb +4 -5
  80. data/lib/rio/fs/native.rb +3 -4
  81. data/lib/rio/fs/stream.rb +3 -4
  82. data/lib/rio/fs/url.rb +3 -4
  83. data/lib/rio/ftp/conncache.rb +19 -5
  84. data/lib/rio/ftp/dir.rb +3 -4
  85. data/lib/rio/ftp/fs.rb +30 -24
  86. data/lib/rio/grande.rb +27 -7
  87. data/lib/rio/handle.rb +3 -4
  88. data/lib/rio/if.rb +19 -15
  89. data/lib/rio/if/basic.rb +7 -7
  90. data/lib/rio/if/csv.rb +5 -6
  91. data/lib/rio/if/dir.rb +120 -114
  92. data/lib/rio/if/file.rb +52 -44
  93. data/lib/rio/if/fileordir.rb +217 -211
  94. data/lib/rio/if/grande.rb +674 -644
  95. data/lib/rio/if/grande_entry.rb +321 -313
  96. data/lib/rio/if/grande_stream.rb +653 -553
  97. data/lib/rio/if/internal.rb +3 -4
  98. data/lib/rio/if/path.rb +425 -426
  99. data/lib/rio/if/rubyio.rb +681 -0
  100. data/lib/rio/if/string.rb +42 -5
  101. data/lib/rio/if/temp.rb +3 -4
  102. data/lib/rio/if/test.rb +245 -238
  103. data/lib/rio/if/yaml.rb +15 -41
  104. data/lib/rio/ioh.rb +7 -5
  105. data/lib/rio/iomode.rb +19 -7
  106. data/lib/rio/ios/fail.rb +4 -5
  107. data/lib/rio/ios/generic.rb +4 -5
  108. data/lib/rio/ios/mode.rb +4 -5
  109. data/lib/rio/ios/null.rb +6 -7
  110. data/lib/rio/iowrap.rb +3 -4
  111. data/lib/rio/kernel.rb +3 -5
  112. data/lib/rio/local.rb +3 -4
  113. data/lib/rio/match.rb +3 -4
  114. data/lib/rio/matchrecord.rb +3 -4
  115. data/lib/rio/no_warn.rb +3 -4
  116. data/lib/rio/nullio.rb +3 -4
  117. data/lib/rio/open3.rb +4 -5
  118. data/lib/rio/ops/construct.rb +3 -4
  119. data/lib/rio/ops/create.rb +11 -6
  120. data/lib/rio/ops/dir.rb +19 -8
  121. data/lib/rio/ops/either.rb +6 -5
  122. data/lib/rio/ops/file.rb +3 -4
  123. data/lib/rio/ops/path.rb +14 -35
  124. data/lib/rio/ops/stream.rb +3 -4
  125. data/lib/rio/ops/stream/input.rb +4 -7
  126. data/lib/rio/ops/stream/output.rb +3 -4
  127. data/lib/rio/ops/stream/read.rb +6 -5
  128. data/lib/rio/ops/stream/write.rb +3 -4
  129. data/lib/rio/ops/symlink.rb +3 -4
  130. data/lib/rio/path.rb +22 -18
  131. data/lib/rio/path/reset.rb +4 -5
  132. data/lib/rio/piper.rb +3 -4
  133. data/lib/rio/piper/cp.rb +3 -4
  134. data/lib/rio/prompt.rb +10 -5
  135. data/lib/rio/rectype.rb +5 -5
  136. data/lib/rio/rl/base.rb +17 -71
  137. data/lib/rio/rl/builder.rb +14 -38
  138. data/lib/rio/rl/chmap.rb +66 -0
  139. data/lib/rio/rl/fs2url.rb +82 -0
  140. data/lib/rio/rl/ioi.rb +4 -4
  141. data/lib/rio/rl/path.rb +44 -122
  142. data/lib/rio/rl/pathmethods.rb +19 -8
  143. data/lib/rio/rl/uri.rb +137 -60
  144. data/lib/rio/rl/withpath.rb +295 -0
  145. data/lib/rio/scheme/aryio.rb +3 -4
  146. data/lib/rio/scheme/cmdio.rb +3 -4
  147. data/lib/rio/scheme/cmdpipe.rb +4 -4
  148. data/lib/rio/scheme/fd.rb +3 -4
  149. data/lib/rio/scheme/ftp.rb +7 -7
  150. data/lib/rio/scheme/http.rb +4 -5
  151. data/lib/rio/scheme/null.rb +3 -4
  152. data/lib/rio/scheme/path.rb +3 -4
  153. data/lib/rio/scheme/stderr.rb +3 -4
  154. data/lib/rio/scheme/stdio.rb +3 -4
  155. data/lib/rio/scheme/strio.rb +3 -4
  156. data/lib/rio/scheme/sysio.rb +3 -4
  157. data/lib/rio/scheme/tcp.rb +3 -4
  158. data/lib/rio/scheme/temp.rb +6 -6
  159. data/lib/rio/state.rb +18 -46
  160. data/lib/rio/state/error.rb +3 -4
  161. data/lib/rio/stream.rb +4 -4
  162. data/lib/rio/stream/base.rb +3 -4
  163. data/lib/rio/stream/duplex.rb +3 -4
  164. data/lib/rio/stream/open.rb +3 -8
  165. data/lib/rio/symantics.rb +3 -4
  166. data/lib/rio/tempdir.rb +2 -2
  167. data/lib/rio/to_rio.rb +3 -4
  168. data/lib/rio/to_rio/all.rb +3 -4
  169. data/lib/rio/to_rio/array.rb +4 -5
  170. data/lib/rio/to_rio/io.rb +4 -5
  171. data/lib/rio/to_rio/object.rb +4 -5
  172. data/lib/rio/to_rio/string.rb +4 -5
  173. data/lib/rio/uri/file.rb +41 -5
  174. data/lib/rio/util.rb +3 -4
  175. data/lib/rio/version.rb +4 -5
  176. data/setup.rb +368 -339
  177. data/test/bin/list_dir.rb +1 -1
  178. data/test/ftp/anon_misc.rb +13 -1
  179. data/test/ftp/anon_special.rb +6 -6
  180. data/test/ftp/anon_write.rb +10 -3
  181. data/test/ftp/ftp2ftp.rb +2 -2
  182. data/test/ftp/testdef.rb +9 -6
  183. data/test/http/all.rb +3 -0
  184. data/test/http/copy-from-http.rb +140 -0
  185. data/test/lib/temp_server.rb +44 -0
  186. data/test/runalltests.rb +3 -1
  187. data/test/runhttp.rb +12 -0
  188. data/test/runhttptests.rb +1 -1
  189. data/test/runtests.rb +41 -3
  190. data/test/tc/abs.rb +9 -5
  191. data/test/tc/all.rb +9 -4
  192. data/test/tc/base.rb +1 -1
  193. data/test/tc/base2.rb +87 -0
  194. data/test/tc/{methods.rb → clone.rb} +72 -50
  195. data/test/tc/closeoncopy.rb +13 -2
  196. data/test/tc/copy-dir-samevar.rb +91 -0
  197. data/test/tc/dir_iter.rb +0 -1
  198. data/test/tc/empty.rb +6 -2
  199. data/test/tc/expand_path.rb +36 -54
  200. data/test/tc/ext.rb +42 -18
  201. data/test/tc/gzip.rb +30 -3
  202. data/test/tc/likeio.rb +5 -1
  203. data/test/tc/line_record_row.rb +51 -0
  204. data/test/tc/noqae.rb +71 -70
  205. data/test/tc/path_parts.rb +175 -0
  206. data/test/tc/programs_util.rb +3 -3
  207. data/test/tc/rename.rb +4 -5
  208. data/test/tc/riorl.rb +9 -7
  209. data/test/tc/skip.rb +35 -6
  210. data/test/tc/skiplines.rb +34 -5
  211. data/test/tc/split.rb +8 -50
  212. data/test/tc/splitlines.rb +65 -0
  213. data/test/tc/splitpath.rb +83 -0
  214. data/test/tc/testcase.rb +1 -1
  215. data/test/tc/truncate.rb +39 -0
  216. data/test/tc/yaml.rb +9 -8
  217. metadata +261 -207
  218. data/ChangeLog +0 -1418
  219. data/VERSION +0 -1
  220. data/lib/rio/doc/MISC.rb +0 -259
  221. data/lib/rio/if/stream.rb +0 -680
  222. data/lib/rio/impl/path.rb +0 -87
  223. data/test/tc/copy-from-http.rb +0 -89
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===============================================================================
3
- # Copyright (c) 2005, 2006 Christopher Kleckner
3
+ # Copyright (c) 2005,2006,2007 Christopher Kleckner
4
4
  # All rights reserved
5
5
  #
6
6
  # This file is part of the Rio library for ruby.
@@ -23,16 +23,15 @@
23
23
  #
24
24
  # To create the documentation for Rio run the command
25
25
  # ruby build_doc.rb
26
- # from the distribution directory. Then point your browser at the 'doc/rdoc' directory.
26
+ # from the distribution directory.
27
27
  #
28
28
  # Suggested Reading
29
29
  # * RIO::Doc::SYNOPSIS
30
30
  # * RIO::Doc::INTRO
31
31
  # * RIO::Doc::HOWTO
32
+ # * RIO::Doc::EXAMPLES
32
33
  # * RIO::Rio
33
34
  #
34
- # <b>Rio is pre-alpha software.
35
- # The documented interface and behavior is subject to change without notice.</b>
36
35
 
37
36
 
38
37
  module RIO
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # ===============================================================================
3
- # Copyright (c) 2005, 2006 Christopher Kleckner
3
+ # Copyright (c) 2005,2006,2007 Christopher Kleckner
4
4
  # All rights reserved
5
5
  #
6
6
  # This file is part of the Rio library for ruby.
@@ -23,441 +23,440 @@
23
23
  #
24
24
  # To create the documentation for Rio run the command
25
25
  # ruby build_doc.rb
26
- # from the distribution directory. Then point your browser at the 'doc/rdoc' directory.
26
+ # from the distribution directory.
27
27
  #
28
28
  # Suggested Reading
29
29
  # * RIO::Doc::SYNOPSIS
30
30
  # * RIO::Doc::INTRO
31
31
  # * RIO::Doc::HOWTO
32
+ # * RIO::Doc::EXAMPLES
32
33
  # * RIO::Rio
33
34
  #
34
- # <b>Rio is pre-alpha software.
35
- # The documented interface and behavior is subject to change without notice.</b>
36
35
 
37
36
 
38
37
  module RIO
39
- class Rio
40
-
41
- # Returns the path for the Rio, which is defined differently for different types of Rios.
42
- #
43
- # For Rios representing paths on the underlying file system this is an alias
44
- # Rio#fspath. For Rios with paths that are not on the file system this is an
45
- # alias for Rio#urlpath.
46
- #
47
- # Otherwise this returns nil.
48
- #
49
- def path(*args) target.path(*args) end
50
-
51
- # For resources that have a absolute URL (RFC1738) representation,
52
- # this returns a string containing that representation.
53
- # For objects that do not this returns a RIORL (a descriptive pseudo-URL).
54
- #
55
- # rio('/var/www/') #=> "file:///var/www/"
56
- # rio('http://rio.rubyforge.org/') #=> "http://rio.rubyforge.org"
57
- #
58
- def to_url() target.to_url end
59
-
60
- # For resources that have a URL (RFC1738) representation, this returns a
61
- # URI object referencing it. Otherwise this raises NoMethodError.
62
- #
63
- # rio('http://rubyforge.org/').to_uri #=> <URI::HTTP:0x818bd84 URL:http://rubyforge.org/>
64
- # rio('adir/afile').to_uri #=> <URI::Generic:0x817d288 URL:adir/afile>
65
- #
66
- def to_uri() target.to_uri end
67
-
68
- # Returns the path for the Rio on the underlying file system
69
- # Returns nil if the Rio is not on the filesystem (i.e. stdin: or http: Rios)
70
- def fspath() target.fspath() end
71
-
72
- # Returns the path portion of the URL representation of the rio
73
- # Returns nil if the Rio URL has no path (i.e. stdin: or http: Rios)
74
- def urlpath() target.urlpath() end
75
-
76
- # Proxy for File#expand_path
77
- #
78
- # Converts a pathname to an absolute pathname.
79
- # Relative paths are referenced from the current working directory of the process
80
- # unless dir_string is given, in which case it will be used as the starting point.
81
- # The given pathname may start with a ``~��, which expands to the process owner�s
82
- # home directory (the environment variable HOME must be set correctly).
83
- # ``~user�� expands to the named user�s home directory.
84
- #
85
- # Returns a Rio representing the returned path
86
- #
87
- #
88
- def expand_path(*args) target.expand_path(*args) end
89
-
90
-
91
- # Returns a new rio with a path equal to the absolute path of this rio
92
- #
93
- # rio('/tmp').chdir
94
- # rio('afile').abs # => rio('/tmp/afile')
95
- def abs(*args) target.abs(*args) end
96
-
97
-
98
- # Returns a new rio with a path equal to the relative path from _other_
99
- # rio('/tmp/afile').rel('/tmp') #=> rio('afile')
100
- # rio('zippy/afile').rel('zippy') #=> rio('afile')
101
- #
102
- def rel(other=nil) target.rel(other) end
103
-
104
-
105
- # Returns a new Rio whose path is the base path that is used by
106
- # Rio#abs to create an absolute Rio from a relative one.
107
- #
108
- # rio('/tmp').chdir
109
- # rio('afile').base # => rio('/tmp/')
110
- #
111
- # See Rio#abs.
112
- #
113
- def base() target.base() end
114
-
115
-
116
- # Sets the string that the Rio considers an extension. The value will be used by
117
- # subsequent calls to Rio#basename. If called with no arguments resets its value
118
- # to the value returned by File#extname. Returns the Rio
119
- # ario = rio('afile.txt')
120
- # ario.ext('.txt').basename #=> rio('afile')
121
- # ario.ext('.zip').basename #=> rio('afile.txt')
122
- # ario.ext.basename #=> rio('afile')
123
- # ario.ext('').basename #=> rio('afile.txt')
124
- # See also Rio#ext,Rio#ext?,Rio#filename,
125
- #
126
- def ext(arg=nil) target.ext(arg); self end
127
-
128
-
129
- # Identical to Rio#ext('')
130
- # See Rio#ext
131
- # ario.basename #=> rio('afile')
132
- # ario.noext.basename #=> rio('afile.txt')
133
- #
134
- def noext() target.noext(); self end
135
-
136
-
137
- # Returns the value of the Rio's 'ext' variable
138
- # This defaults to the value returned by Rio#extname and may be set by either calling Rio#ext
139
- # or by passing an argument Rio#basename
140
- # See also Rio#basename, Rio#ext, Rio#extname, Rio#noext
141
- #
142
- # ario = rio('afile.txt')
143
- # ario.ext? #=> '.txt'
144
- # ario.ext('.txt').basename #=> rio('afile')
145
- # ario.ext? #=> '.txt'
146
- # ario.ext('.zip').basename #=> rio('afile.txt')
147
- # ario.ext? #=> '.zip'
148
- # ario.basename('.tar') #=> rio('afile.txt')
149
- # ario.ext? #=> '.tar'
150
- # ario.ext.basename #=> rio('afile')
151
- # ario.ext? #=> '.txt'
152
- # ario.noext.basename #=> rio('afile.txt')
153
- # ario.ext? #=> ''
154
- #
155
- def ext?() target.ext?() end
156
-
157
-
158
- # Similar to File#basename
159
- #
160
- # Returns a Rio whose path is that returned by File#basename when passed the path
161
- # of a rio and the value returned by File#extname. This differs from the behaviour
162
- # of File#basename.
163
- # File.basename('afile.txt') #=> 'afile.txt'
164
- # File.basename('afile.txt',File.extname('afile.txt')) #=> 'afile'
165
- # rio('afile.txt').basename #=> rio('afile')
166
- # rio('afile.txt').basename('.txt') #=> same thing
167
- # rio('afile.txt').ext('.txt').basename #=> same thing
168
- # See also Rio#ext,Rio#ext?,Rio#filename,
169
- def basename(*args) target.basename(*args) end
170
-
171
-
172
- # Calls File#dirname
173
- #
174
- # Returns a new Rio referencing the directory portion of a Rio.
175
- # rio('/tmp/zippy.txt').dirname #=> rio('/tmp')
176
- #
177
- def dirname(*args) target.dirname(*args) end
178
-
179
-
180
- # Calls File#extname
181
- #
182
- # Returns a String containing the path's extension
183
- # rio('/tmp/zippy.txt').extname #=> rio('.txt')
184
- #
185
- def extname(*args) target.extname(*args) end
186
-
187
-
188
- # Returns a new Rio with all path information stripped away. This is similar to
189
- # Rio#basename, except that it always includes an extension if one exists
190
- #
191
- # rio('apath/afile.txt').filename #=> rio('afile.txt')
192
- #
193
- def filename() target.filename() end
194
-
195
-
196
- # Replace the part of the path returned by Rio#extname. If in +rename+
197
- # mode, also renames the referenced filesystem object.
198
- #
199
- # Returns the extension
200
- #
201
- # ario = rio('dirA/dirB/afile.rb')
202
- # ario.extname = '.txt' # rio('dirC/bfile.txt')
203
- #
204
- # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
205
- #
206
- # See Rio#extname, Rio#rename
207
- #
208
- def extname=(arg) target.extname = arg end
209
-
210
-
211
- # Replace the part of the path returned by Rio#basename. If in +rename+
212
- # mode, also renames the referenced filesystem object.
213
- #
214
- # Returns the new value of +basename+
215
- #
216
- # ario = rio('dirA/dirB/afile.rb')
217
- # ario.dirname = 'dirC' # rio('dirC/afile.rb')
218
- # ario.basename = 'bfile' # rio('dirC/bfile.rb')
219
- # ario.extname = '.txt' # rio('dirC/bfile.txt')
220
- # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
221
- #
222
- # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
223
- # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
224
- # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
225
- # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
226
- #
227
- # See Rio#basename, Rio#rename
228
- #
229
- def basename=(arg) target.basename = arg end
230
-
231
-
232
- # Replace the part of the path returned by Rio#dirname. If in +rename+
233
- # mode, also renames the referenced filesystem object.
234
- #
235
- # Returns the new value of +dirname+
236
- #
237
- # ario = rio('dirA/dirB/afile.rb')
238
- # ario.dirname = 'dirC' # rio('dirC/afile.rb')
239
- # ario.basename = 'bfile' # rio('dirC/bfile.rb')
240
- # ario.extname = '.txt' # rio('dirC/bfile.txt')
241
- # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
242
- #
243
- # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
244
- # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
245
- # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
246
- # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
247
- #
248
- # See Rio#dirname, Rio#rename
249
- #
250
- def dirname=(arg) target.dirname = arg end
251
-
252
-
253
-
254
- # Replace the part of the path returned by Rio#filename. If in +rename+
255
- # mode, also renames the referenced filesystem object.
256
- #
257
- # Returns the new value of +filename+
258
- #
259
- # ario = rio('dirA/dirB/afile.rb')
260
- # ario.dirname = 'dirC' # rio('dirC/afile.rb')
261
- # ario.basename = 'bfile' # rio('dirC/bfile.rb')
262
- # ario.extname = '.txt' # rio('dirC/bfile.txt')
263
- # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
264
- #
265
- # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
266
- # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
267
- # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
268
- # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
269
- #
270
- # See Rio#filename, Rio#rename
271
- #
272
- def filename=(arg) target.filename = arg end
273
-
274
-
275
- # Creates new Rio by adding args as additional directory components like File#join.
276
- #
277
- # ario = rio('adir')
278
- # brio = rio('b')
279
- # crio = ario.join(brio) #=> rio('adir/b')
280
- #
281
- # ario = rio('adir')
282
- # ario.join('b','c','d') #=> rio('ario/b/c/d')
283
- #
284
- # See also Rio#/
285
- def join(*args) target.join(*args) end
286
-
287
-
288
- # Creates an array of Rios, one for each path element.
289
- # (Note that this behavior differs from File#split.)
290
- #
291
- # rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
292
- #
293
- # The array returned is extended with a +to_rio+ method,
294
- # which will put the parts back together again.
295
- #
296
- # ary = rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
297
- # ary.to_rio #=> rio('a/b/c')
298
- #
299
- # ary = rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
300
- # ary[1] = rio('d')
301
- # ary.to_rio #=> rio('a/d/c')
302
- #
303
- # See also Rio#join, Rio#/
304
- def split() target.split() end
305
-
306
-
307
- # Subdirectory operator.
308
- #
309
- # Effectively the same as Rio#join(arg)
310
- #
311
- # a = rio('a')
312
- # b = rio('b')
313
- # c = a/b #=> rio('a/b')
314
- #
315
- # ario = rio('adir')
316
- # ario/'afile.rb' #=> rio('ario/afile.rb')
317
- # ario/'b'/'c'/'d' #=> rio('ario/b/c/d')
318
- #
319
- # ario = rio('adir')
320
- # ario /= 'afile.rb' #=> rio('ario/afile.rb')
321
- #
322
- def /(arg) target / arg end
323
-
324
-
325
- # Create a Rio referencing Rio#to_str + arg.to_str
326
- #
327
- # rio('afile') + '-0.1' #=> rio('afile-0.1')
328
- #
329
- def +(arg) target + arg end
330
-
331
- # Create a new Rio referencing the result of applying String#sub to the value returned by
332
- # Rio#to_s. So:
333
- #
334
- # ario.sub(re,string)
335
- # is equivelent to
336
- # rio(ario.to_s.sub(re,string))
337
- #
338
- def sub(re,string) target.sub(re,string) end
339
-
340
- # Create a new Rio referencing the result of applying String#gsub to the value returned by
341
- # Rio#to_s. So:
342
- #
343
- # ario.gsub(re,string)
344
- # is equivelent to
345
- # rio(ario.to_s.gsub(re,string))
346
- #
347
- def gsub(re,string) target.gsub(re,string) end
348
-
349
-
350
- # Rio#catpath!
351
- #
352
- #
353
- #def catpath!(*args) target.catpath!(*args); self end
354
-
355
-
356
- # Rio#catpath
357
- #
358
- #
359
- #def catpath(*args) target.catpath(*args) end
360
-
361
-
362
- # Changes a Rio inplace by adding args as additional directory components like Rio#join,
363
- #
364
- def join!(*args) target.join!(*args); self end
365
-
366
- # Rio#rootpath
367
- #
368
- #
369
- def rootpath(*args) # :nodoc:
370
- target.rootpath(*args)
38
+ module IF
39
+ module Path
40
+
41
+
42
+ # Returns the path for the Rio, which is defined differently for different types of Rios.
43
+ #
44
+ # For Rios representing paths on the underlying file system this is an alias
45
+ # IF::Path#fspath. For Rios with paths that are not on the file system this is an
46
+ # alias for IF::Path#urlpath.
47
+ #
48
+ # Otherwise this returns nil.
49
+ #
50
+ def path(*args) target.path(*args) end
51
+
52
+ # For resources that have a absolute URL (RFC1738) representation,
53
+ # this returns a string containing that representation.
54
+ # For objects that do not this returns a RIORL (a descriptive pseudo-URL).
55
+ #
56
+ # rio('/var/www/') #=> "file:///var/www/"
57
+ # rio('http://rio.rubyforge.org/') #=> "http://rio.rubyforge.org"
58
+ #
59
+ def to_url() target.to_url end
60
+
61
+ # For resources that have a URL (RFC1738) representation, this returns a
62
+ # URI object referencing it. Otherwise this raises NoMethodError.
63
+ #
64
+ # rio('http://rubyforge.org/').to_uri #=> <URI::HTTP:0x818bd84 URL:http://rubyforge.org/>
65
+ # rio('adir/afile').to_uri #=> <URI::Generic:0x817d288 URL:adir/afile>
66
+ #
67
+ def to_uri() target.to_uri end
68
+
69
+ # Returns the path for the Rio on the underlying file system
70
+ # Returns nil if the Rio is not on the filesystem (i.e. stdin: or http: Rios)
71
+ def fspath() target.fspath() end
72
+
73
+ # Returns the path portion of the URL representation of the rio
74
+ # Returns nil if the Rio URL has no path (i.e. stdin: or http: Rios)
75
+ def urlpath() target.urlpath() end
76
+
77
+ # Calls File#expand_path
78
+ #
79
+ #
80
+ # Converts a pathname to an absolute pathname.
81
+ # Relative paths are referenced from the current working directory of the process
82
+ # unless dir_string is given, in which case it will be used as the starting point.
83
+ # The given pathname may start with a ``~��, which expands to the process owner�s
84
+ # home directory (the environment variable HOME must be set correctly).
85
+ # ``~user�� expands to the named user�s home directory.
86
+ #
87
+ # Returns a Rio representing the returned path
88
+ #
89
+ #
90
+ def expand_path(*args) target.expand_path(*args) end
91
+
92
+
93
+ # Returns a new rio with a path equal to the absolute path of this rio
94
+ #
95
+ # rio('/tmp').chdir
96
+ # rio('afile').abs # => rio('/tmp/afile')
97
+ def abs(*args) target.abs(*args) end
98
+
99
+
100
+ # Returns a new rio with a path equal to the relative path from _other_
101
+ # rio('/tmp/afile').rel('/tmp') #=> rio('afile')
102
+ # rio('zippy/afile').rel('zippy') #=> rio('afile')
103
+ #
104
+ def rel(other=nil) target.rel(other) end
105
+
106
+
107
+ # Returns a new Rio whose path is the base path that is used by
108
+ # IF::Path#abs to create an absolute Rio from a relative one.
109
+ #
110
+ # rio('/tmp').chdir
111
+ # rio('afile').base # => rio('/tmp/')
112
+ #
113
+ # See IF::Path#abs.
114
+ #
115
+ def base() target.base() end
116
+
117
+
118
+ # Sets the string that the Rio considers an extension. The value will be used by
119
+ # subsequent calls to IF::Path#basename. If called with no arguments resets its value
120
+ # to the value returned by File#extname. Returns the Rio.
121
+ #
122
+ # ario = rio('afile.tar.gz')
123
+ # ario.ext? #=> '.ext'
124
+ # ario.basename #=> rio('afile.tar')
125
+ # ario.ext('.tar.gz').basename #=> rio('afile')
126
+ # ario.ext? #=> '.tar.gz'
127
+ #
128
+ # ario = rio('afile.txt')
129
+ # ario.ext('.txt').basename #=> rio('afile')
130
+ # ario.ext('.zip').basename #=> rio('afile.txt')
131
+ # ario.ext.basename #=> rio('afile')
132
+ # ario.ext('').basename #=> rio('afile.txt')
133
+ #
134
+ # See also IF::Path#ext?,IF::Path#noext,IF::Path#basename,
135
+ #
136
+ def ext(arg=nil) target.ext(arg); self end
137
+
138
+
139
+ # Identical to IF::Path#ext('')
140
+ #
141
+ # ario.basename #=> rio('afile')
142
+ # ario.noext.basename #=> rio('afile.txt')
143
+ #
144
+ # See also IF::Path#ext
145
+ #
146
+ def noext() target.noext(); self end
147
+
148
+
149
+ # Returns the value of the Rio's 'ext' variable
150
+ # This defaults to the value returned by IF::Path#extname and may be set by either calling IF::Path#ext
151
+ # or by passing an argument IF::Path#basename
152
+ # See also IF::Path#basename, IF::Path#ext, IF::Path#extname, IF::Path#noext
153
+ #
154
+ # ario = rio('afile.txt')
155
+ # ario.ext? #=> '.txt'
156
+ # ario.ext('.txt').basename #=> rio('afile')
157
+ # ario.ext? #=> '.txt'
158
+ # ario.ext('.zip').basename #=> rio('afile.txt')
159
+ # ario.ext? #=> '.zip'
160
+ # ario.basename('.tar') #=> rio('afile.txt')
161
+ # ario.ext? #=> '.tar'
162
+ # ario.ext.basename #=> rio('afile')
163
+ # ario.ext? #=> '.txt'
164
+ # ario.noext.basename #=> rio('afile.txt')
165
+ # ario.ext? #=> ''
166
+ #
167
+ def ext?() target.ext?() end
168
+
169
+
170
+ # Calls File#extname
171
+ #
172
+ # Returns a String containing the path's extension
173
+ # rio('/tmp/zippy.txt').extname #=> '.txt'
174
+ #
175
+ def extname(*args) target.extname(*args) end
176
+
177
+
178
+ # Similar to File#basename
179
+ #
180
+ # Returns a Rio whose path is that returned by File#basename when passed the path
181
+ # of a rio and the value returned by File#extname. This differs from the behaviour
182
+ # of File#basename.
183
+ #
184
+ # File.basename('afile.txt') #=> 'afile.txt'
185
+ # File.basename('afile.txt',File.extname('afile.txt')) #=> 'afile'
186
+ # rio('afile.txt').basename #=> rio('afile')
187
+ # rio('afile.txt').basename('.txt') #=> same thing
188
+ # rio('afile.txt').ext('.txt').basename #=> same thing
189
+ #
190
+ # See also IF::Path#ext,IF::Path#ext?,IF::Path#filename,
191
+ #
192
+ def basename(*args) target.basename(*args) end
193
+
194
+
195
+ # Calls File#dirname
196
+ #
197
+ # Returns a new Rio referencing the directory portion of a Rio.
198
+ # rio('/tmp/zippy.txt').dirname #=> rio('/tmp')
199
+ #
200
+ def dirname(*args) target.dirname(*args) end
201
+
202
+
203
+ # Returns a new Rio with all path information stripped away. This is similar to
204
+ # IF::Path#basename, except that it always includes an extension if one exists
205
+ #
206
+ # rio('apath/afile.txt').filename #=> rio('afile.txt')
207
+ #
208
+ def filename() target.filename() end
209
+
210
+
211
+ # Replace the part of the path returned by IF::Path#extname. If in +rename+
212
+ # mode, also renames the referenced filesystem object.
213
+ #
214
+ # Returns the extension
215
+ #
216
+ # ario = rio('dirA/dirB/afile.rb')
217
+ # ario.extname = '.txt' # rio('dirC/bfile.txt')
218
+ #
219
+ # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
220
+ #
221
+ # See aslo IF::Path#extname, IF::FileOrDir#rename
222
+ #
223
+ def extname=(arg) target.extname = arg end
224
+
225
+
226
+ # Replace the part of the path returned by IF::Path#basename. If in +rename+
227
+ # mode, also renames the referenced filesystem object.
228
+ #
229
+ # Returns the new value of +basename+
230
+ #
231
+ # ario = rio('dirA/dirB/afile.rb')
232
+ # ario.dirname = 'dirC' # rio('dirC/afile.rb')
233
+ # ario.basename = 'bfile' # rio('dirC/bfile.rb')
234
+ # ario.extname = '.txt' # rio('dirC/bfile.txt')
235
+ # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
236
+ #
237
+ # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
238
+ # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
239
+ # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
240
+ # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
241
+ #
242
+ # See IF::Path#basename, IF::FileOrDir#rename
243
+ #
244
+ def basename=(arg) target.basename = arg end
245
+
246
+
247
+ # Replace the part of the path returned by IF::Path#dirname. If in +rename+
248
+ # mode, also renames the referenced filesystem object.
249
+ #
250
+ # Returns the new value of +dirname+
251
+ #
252
+ # ario = rio('dirA/dirB/afile.rb')
253
+ # ario.dirname = 'dirC' # rio('dirC/afile.rb')
254
+ # ario.basename = 'bfile' # rio('dirC/bfile.rb')
255
+ # ario.extname = '.txt' # rio('dirC/bfile.txt')
256
+ # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
257
+ #
258
+ # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
259
+ # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
260
+ # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
261
+ # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
262
+ #
263
+ # See IF::Path#dirname, IF::FileOrDir#rename
264
+ #
265
+ def dirname=(arg) target.dirname = arg end
266
+
267
+
268
+
269
+ # Replace the part of the path returned by IF::Path#filename. If in +rename+
270
+ # mode, also renames the referenced filesystem object.
271
+ #
272
+ # Returns the new value of +filename+
273
+ #
274
+ # ario = rio('dirA/dirB/afile.rb')
275
+ # ario.dirname = 'dirC' # rio('dirC/afile.rb')
276
+ # ario.basename = 'bfile' # rio('dirC/bfile.rb')
277
+ # ario.extname = '.txt' # rio('dirC/bfile.txt')
278
+ # ario.filename = 'cfile.rb' # rio('dirC/cfile.rb')
279
+ #
280
+ # rio('adir/afile.txt').rename.filename = 'bfile.rb' # adir/afile.txt => adir/bfile.rb
281
+ # rio('adir/afile.txt').rename.basename = 'bfile' # adir/afile.txt => adir/bfile.txt
282
+ # rio('adir/afile.txt').rename.extname = '.rb' # adir/afile.txt => adir/afile.rb
283
+ # rio('adir/afile.txt').rename.dirname = 'b/c' # adir/afile.txt => b/c/afile.txt
284
+ #
285
+ # See IF::Path#filename, IF::FileOrDir#rename
286
+ #
287
+ def filename=(arg) target.filename = arg end
288
+
289
+
290
+ # Creates new Rio by adding args as additional directory components like File#join.
291
+ #
292
+ # ario = rio('adir')
293
+ # brio = rio('b')
294
+ # crio = ario.join(brio) #=> rio('adir/b')
295
+ #
296
+ # ario = rio('adir')
297
+ # ario.join('b','c','d') #=> rio('ario/b/c/d')
298
+ #
299
+ # See also IF::Path#/
300
+ def join(*args) target.join(*args) end
301
+
302
+
303
+ # Returns an array of Rios, one for each path element.
304
+ # (Note that this behavior differs from File#split.)
305
+ #
306
+ # rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
307
+ #
308
+ # The array returned is extended with a +to_rio+ method,
309
+ # which will put the parts back together again.
310
+ #
311
+ # ary = rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
312
+ # ary.to_rio #=> rio('a/b/c')
313
+ #
314
+ # ary = rio('a/b/c').split #=> [rio('a'),rio('b'),rio('c')]
315
+ # ary[1] = rio('d')
316
+ # ary.to_rio #=> rio('a/d/c')
317
+ #
318
+ # See also IF::Path#join, IF::Path#/
319
+ #
320
+ def splitpath() target.splitpath() end
321
+
322
+
323
+ # Subdirectory operator.
324
+ #
325
+ # Effectively the same as IF::Path#join(arg)
326
+ #
327
+ # a = rio('a')
328
+ # b = rio('b')
329
+ # c = a/b #=> rio('a/b')
330
+ #
331
+ # ario = rio('adir')
332
+ # ario/'afile.rb' #=> rio('adir/afile.rb')
333
+ # ario/'b'/'c'/'d' #=> rio('adir/b/c/d')
334
+ #
335
+ # ario = rio('adir')
336
+ # ario /= 'afile.rb' #=> rio('adir/afile.rb')
337
+ #
338
+ def /(arg)
339
+ target / arg
340
+ end
341
+
342
+
343
+ # Rio#catpath!
344
+ #
345
+ #
346
+ #def catpath!(*args) target.catpath!(*args); self end
347
+
348
+
349
+ # Rio#catpath
350
+ #
351
+ #
352
+ #def catpath(*args) target.catpath(*args) end
353
+
354
+
355
+ # Changes a Rio inplace by adding args as additional directory components like IF::Path#join,
356
+ #
357
+ def join!(*args) target.join!(*args); self end
358
+
359
+ # IF::GrandeStream#rootpath
360
+ #
361
+ #
362
+ def rootpath(*args) # :nodoc:
363
+ target.rootpath(*args)
364
+ end
365
+
366
+
367
+ # IF::GrandeStream#root
368
+ #
369
+ #
370
+ ##def root(*args,&block) target.root(*args,&block) end
371
+
372
+
373
+ # Rio#cwd
374
+ #
375
+ #
376
+ ##def cwd(*args,&block) target.cwd(*args,&block) end
377
+
378
+
379
+ # IF::Grande#getwd
380
+ #
381
+ #
382
+ ##def getwd(*args,&block) target.getwd(*args,&block) end
383
+
384
+
385
+ # Returns the scheme for the Rio's URI-like URI#scheme where the Rio is represented
386
+ # by a standard URI. For Rios that are not represented by standard URIs one of
387
+ # Rio's non-standard schemes is returned.
388
+ #
389
+ # rio('http://ruby-doc.org/').scheme #=> 'http'
390
+ #
391
+ def scheme(*args) target.scheme(*args) end
392
+
393
+ # Calls URI#host for Rios which have a URI. Otherwise raises NoMethodError.
394
+ #
395
+ # rio('http://ruby-doc.org/').host #=> 'ruby-doc'
396
+ #
397
+ def host(*args) target.host(*args) end
398
+
399
+ # Calls URI#opaque for Rios which have URI representations. The opaque portion
400
+ # of a URI is the portion after the colon and before the question-mark beginning
401
+ # the query.
402
+ #
403
+ # rio('http://example.org/do.cgi?n=1').opaque #=> '//example.org/do.cgi'
404
+ #
405
+ # For Rios that do not have URL representations, returns the same part of
406
+ # Rio's internal psuedo-URL
407
+ def opaque(*args) target.opaque(*args) end
408
+
409
+
410
+
411
+ # Calls URI#merge
412
+ #
413
+ # Merges two Rios. URI#merge does not document exactly what merging two URIs means.
414
+ # This appears to join the paths like <tt>other + path</tt>.
415
+ # See URI#merge for less information.
416
+ #
417
+ def merge(other) target.merge(other) end
418
+
419
+
420
+ # Calls URI#route_from
421
+ #
422
+ # Returns a new rio representing the path to this Rio from the perspective of _other_.
423
+ # URI#route_from requires that absolute URIs be used. IF::Path#route_from does not.
424
+ #
425
+ def route_from(other) target.route_from(other) end
426
+
427
+ # Calls URI#route_to
428
+ #
429
+ # Returns a new rio representing the path to _other_ from the perspective of this Rio.
430
+ # URI#route_to requires that absolute URIs be used. IF::Path#route_to does not.
431
+ #
432
+ def route_to(other) target.route_to(other) end
433
+
434
+ # Calls Pathname#cleanpath
435
+ #
436
+ # Returns a new Rio whose path is the clean pathname of +self+ with
437
+ # consecutive slashes and useless dots
438
+ # removed. The filesystem is not accessed.
439
+ #
440
+ # If +consider_symlink+ is +true+, then a more conservative algorithm is used
441
+ # to avoid breaking symbolic linkages. This may retain more <tt>..</tt>
442
+ # entries than absolutely necessary, but without accessing the filesystem,
443
+ # this can't be avoided. See #realpath.
444
+ #
445
+ def cleanpath(consider_symlink=false) target.cleanpath(consider_symlink) end
446
+
447
+ # Calls Pathname#realpath
448
+ #
449
+ # Returns a new Rio whose path is the real (absolute) pathname
450
+ # of +self+ in the actual filesystem.
451
+ # The real pathname doesn't contain symlinks or useless dots.
452
+ #
453
+ def realpath() target.realpath() end
454
+
371
455
  end
372
-
373
-
374
- # Rio#root
375
- #
376
- #
377
- ##def root(*args,&block) target.root(*args,&block) end
378
-
379
-
380
- # Rio#cwd
381
- #
382
- #
383
- ##def cwd(*args,&block) target.cwd(*args,&block) end
384
-
385
-
386
- # Rio#getwd
387
- #
388
- #
389
- ##def getwd(*args,&block) target.getwd(*args,&block) end
390
-
391
-
392
- # Returns the scheme for the Rio's URI-like URI#scheme where the Rio is represented
393
- # by a standard URI. For Rios that are not represented by standard URIs one of
394
- # Rio's non-standard schemes is returned.
395
- #
396
- # rio('http://ruby-doc.org/').scheme #=> 'http'
397
- #
398
- def scheme(*args) target.scheme(*args) end
399
-
400
- # Calls URI#host for Rios which have a URI. Otherwise raises NoMethodError.
401
- #
402
- # rio('http://ruby-doc.org/').host #=> 'ruby-doc'
403
- #
404
- def host(*args) target.host(*args) end
405
-
406
- # Calls URI#opaque for Rios which have URI representations. The opaque portion
407
- # of a URI is the portion after the colon and before the question-mark beginning
408
- # the query.
409
- #
410
- # rio('http://example.org/do.cgi?n=1').opaque #=> '//example.org/do.cgi'
411
- #
412
- # For Rios that do not have URL representations, returns the same part of
413
- # Rio's internal psuedo-URL
414
- def opaque(*args) target.opaque(*args) end
415
-
416
-
417
-
418
- # Calls URI#merge
419
- #
420
- # Merges two Rios. URI#merge does not document exactly what merging two URIs means.
421
- # This appears to join the paths like <tt>other + path</tt>.
422
- # See URI#merge for less information.
423
- #
424
- def merge(other) target.merge(other) end
425
-
426
-
427
- # Calls URI#route_from
428
- #
429
- # Returns a new rio representing the path to this Rio from the perspective of _other_.
430
- # URI#route_from requires that absolute URIs be used. Rio#route_from does not.
431
- #
432
- def route_from(other) target.route_from(other) end
433
-
434
- # Calls URI#route_to
435
- #
436
- # Returns a new rio representing the path to _other_ from the perspective of this Rio.
437
- # URI#route_to requires that absolute URIs be used. Rio#route_to does not.
438
- #
439
- def route_to(other) target.route_to(other) end
440
-
441
- # Calls Pathname#cleanpath
442
- #
443
- # Returns a new Rio whose path is the clean pathname of +self+ with
444
- # consecutive slashes and useless dots
445
- # removed. The filesystem is not accessed.
446
- #
447
- # If +consider_symlink+ is +true+, then a more conservative algorithm is used
448
- # to avoid breaking symbolic linkages. This may retain more <tt>..</tt>
449
- # entries than absolutely necessary, but without accessing the filesystem,
450
- # this can't be avoided. See #realpath.
451
- #
452
- def cleanpath(consider_symlink=false) target.cleanpath(consider_symlink) end
453
-
454
- # Calls Pathname#realpath
455
- #
456
- # Returns a new Rio whose path is the real (absolute) pathname
457
- # of +self+ in the actual filesystem.
458
- # The real pathname doesn't contain symlinks or useless dots.
459
- #
460
- def realpath() target.realpath() end
461
-
456
+ end
457
+ end
458
+ module RIO
459
+ class Rio
460
+ include RIO::IF::Path
462
461
  end
463
462
  end