有人知道如何在文本文件Erlang語言中追加新行? 我想這個列表保存:Erlang,我如何使用換行符創建文本文件?
Data = ["one", "two", "three"],
與新線的文本文件:
one
two
three
我想:
write() ->
Data = ["1","2","3"],
Print = string:join(Data, "\n"),
file:write_file("/Documents/foo.txt", [Print]).
但它創建了在線數據的文本文件:
one\ntwo\nthree
非常感謝,這正是我需要的! – 2015-02-19 12:34:02