Here's a sample method:
def append_before_extension(filepath, append_string)
ext = File.extname(filepath)
base = File.basename(filepath, ext)
return base + append_string + ext
end
Why can't Java make file processing so simple? Why can't I just use Ruby all the time?
0 comments on this foolish article: