Popular just now

ad1

Erlang write to file

If you want to write some data to a file, say to "a.txt"

1.open the file in append mode
{ok, WriteDescr} = file:open(a.txt, [raw, append]),

2.write the data on file
file:write(WriteDescr,"data to be written"),

3.close the file
file:close(WriteDescr).

No comments:

Post a Comment