&tag(Ruby, ファイル);
def write_bom(fp)
data = " "
data.setbyte(0, 0xEF)
data.setbyte(1, 0xBB)
data.setbyte(2, 0xBF)
fp.write(data)
end
FileUtils.rm("d:/temp/foo.txt")
FileUtils.rm(Dir.glob("d:/temp/*.jpg"))
f = File.open("log.txt", "w")
f.print("abc\r\n")
f.close
abc^M