From: Pierre Barbier de Reuille Date: 2006-07-16T22:24:10+09:00 Subject: Re: possible DIR["**"] anomaly Alex Young wrote: > Pierre Barbier de Reuille wrote: > >> Make me wonder if anybody had proposed to use the operator / for joining >> files component. >> A recent addition to Python is a class that inherit string but with all >> the facilities for paths (i.e. globbing, listing, joining, ...) and I >> must say it is very convenient. The previous two lines could be written >> something like: >> >> librbfiles = Path.new("**")/"lib"/"**"/"*.rb" >> librbfiles.glob >> >> I think I will write it and post it here so that you may have a feeling >> for what it can (or cannot) do. > > Like this? > > http://www.ruby-doc.org/stdlib/libdoc/pathname/rdoc/classes/Pathname.html > Indeed ^^ I didn't yet know half the ruby classes :/ The only thing is, instead of +, IMHO the operator / would make more sense for joining paths. But ok, it is already existing :) Pierre