J
Jesús Gabriel y Galán
Many Thanks Robert, I did the following,
require 'pathname'
=A0dir=3D Pathname "K:/test"
dir.each_entry do |file|
=A0if file.file?
file.each {|line| print line} ## Checking if it can access a line in a
file
=A0end
=A0end
It isn't giving any error message which is great but also not Displaying
any Output.
Probably i am not using file.each{|line| print line} correctly.
Try:
file.foreachline {|line| print line}
It seems Pathname objects don't have an each method...
Jesus.