From: Matt Armstrong Date: 2001-12-01T05:02:00+09:00 Subject: [ruby-talk:27119] Re: Looking for x-platform path builder Jim Freeze writes: > Is there a standardized way to build file pathnames > that uses the dir seperator that is OS specific? > > path = "/somepath" > Dir.open(path).each { |f| > p path_build(path, f) #=> yields /somepath/somefile on unix > p path_build(path, f) #=> yields /somepath\somefile on dos See the File class, in particular File#join, File#split, File#basename, File#dirname, and the File#SEPARATOR variable. -- matt