[erlang-questions] File size limits on file:write_file and file:write?

Dave Challis <>
Wed May 4 13:49:57 CEST 2011

On 04/05/11 12:45, Ahmed Omar wrote:
> You wanted file:write_file/2 i guess

Oops, that was a mistake in the original post.

I've tried both:

file:write_file("/tmp/foo", Data).


{ok, Fp} = file:open("/tmp/foo", [write]).
file:write(Fp, Data).

Both give {error,badarg} when Data > 2Gb, and write the file fine otherwise.


Dave Challis

More information about the erlang-questions mailing list