Absolute Path To Itself
Join the DZone community and get the full member experience.
Join For Free// returns absolute path to the file from which the code was executed
require 'pathname'
puts(Pathname.new($0).realpath)
Opinions expressed by DZone contributors are their own.
Comments