lib/rio/if/path.rb in rio-0.3.3 vs lib/rio/if/path.rb in rio-0.3.4

- old
+ new

@@ -319,11 +319,11 @@ # ario /= 'afile.rb' #=> rio('ario/afile.rb') # def /(arg) target / arg end - # Create a Rio referencing Rio#to_s + arg.to_s + # Create a Rio referencing Rio#to_str + arg.to_str # # rio('afile') + '-0.1' #=> rio('afile-0.1') # def +(arg) target + arg end @@ -363,11 +363,13 @@ def join!(*args) target.join!(*args); self end # Rio#rootpath # # - def rootpath(*args) target.rootpath(*args) end + def rootpath(*args) # :nodoc: + target.rootpath(*args) + end # Rio#root # # @@ -384,11 +386,11 @@ # # ##def getwd(*args,&block) target.getwd(*args,&block) end - # Returns the scheme for the Rio's URI like URI#scheme where the Rio is represented + # Returns the scheme for the Rio's URI-like URI#scheme where the Rio is represented # by a standard URI. For Rios that are not represented by standard URIs one of # Rio's non-standard schemes is returned. # # rio('http://ruby-doc.org/').scheme #=> 'http' # @@ -432,8 +434,28 @@ # Returns a new rio representing the path to _other_ from the perspective of this Rio. # URI#route_to requires that absolute URIs be used. Rio#route_to does not. # def route_to(other) target.route_to(other) end + # Calls Pathname#cleanpath + # + # Returns a new Rio whose path is the clean pathname of +self+ with + # consecutive slashes and useless dots + # removed. The filesystem is not accessed. + # + # If +consider_symlink+ is +true+, then a more conservative algorithm is used + # to avoid breaking symbolic linkages. This may retain more <tt>..</tt> + # entries than absolutely necessary, but without accessing the filesystem, + # this can't be avoided. See #realpath. + # + def cleanpath(consider_symlink=false) target.cleanpath(consider_symlink) end + # Calls Pathname#realpath + # + # Returns a new Rio whose path is the real (absolute) pathname + # of +self+ in the actual filesystem. + # The real pathname doesn't contain symlinks or useless dots. + # + def realpath() target.realpath() end + end end