英音:
注释内容
=begin
下面顺序按照看了哪写哪的原则,顺序会比较混乱
=end
读文件操作:
File.open("D:\\installationLog.txt", "r") do |file|
file.each_line do |line|
puts line
end
end
写文件操作:
file=File.new('D:\\testruby.txt','w')
file.puts "first line"
file.puts "second line"
file.close