You can use the Erlang file
module function position/2
and truncate/1
to set the position at the beginning of the file and truncate it:
file |> :file.position(:bof) |> :file.truncate()
You can use the Erlang file
module function position/2
and truncate/1
to set the position at the beginning of the file and truncate it:
file |> :file.position(:bof) |> :file.truncate()