勉強中で忘れそうなのでメモ
def file = new File("C://test.txt")
def fw = file.newWriter()
fw.writeLine "hogehoge1"
fw.writeLine "hogehoge2"
fw.writeLine "hogehoge3"
fw.close()
def fr = file.newReader()
def s
while(s = fr.readLine()){
println s
}
fr.close()
Go to list of users who liked
More than 5 years have passed since last update.
勉強中で忘れそうなのでメモ
def file = new File("C://test.txt")
def fw = file.newWriter()
fw.writeLine "hogehoge1"
fw.writeLine "hogehoge2"
fw.writeLine "hogehoge3"
fw.close()
def fr = file.newReader()
def s
while(s = fr.readLine()){
println s
}
fr.close()
Register as a new user and use Qiita more conveniently
Go to list of users who liked