H
Hawksury Gear
Hello,
I am new to Ruby.
I am trying to "Read Content" of all the files from a Directory. So far
I can "Open" all files but this just shows the "names of all files" in
the directory and not the "file content".
My Program code is
arr= Dir.open("K:/test").entries
arr.each { |i| puts i }
I can open and read the content of an individual file using "File.open"
command but I don't know how to read the content of all the files in a
particular Directory.
It is may be very simple but I just can't find a way to do. Could you
please help?
Many Thanks,
I am new to Ruby.
I am trying to "Read Content" of all the files from a Directory. So far
I can "Open" all files but this just shows the "names of all files" in
the directory and not the "file content".
My Program code is
arr= Dir.open("K:/test").entries
arr.each { |i| puts i }
I can open and read the content of an individual file using "File.open"
command but I don't know how to read the content of all the files in a
particular Directory.
It is may be very simple but I just can't find a way to do. Could you
please help?
Many Thanks,