[erlang-questions] file:open(File, [ram])

37 views
Skip to first unread message

JD Bothma

unread,
Nov 13, 2012, 11:21:19 AM11/13/12
to Erlang Questions
The 'ram' option to file:open/2 seems to implement some functionality I want: to treat a file in memory as if it's a file on disk to let a library support both disk and in-memory data concisely.

It doesn't look like this option is documented, but it's probably useful to many. It looks like it's used by at least erl_tar.

Can this become part of the documented API of the file module?

JD

Patrik Nyblom

unread,
Nov 14, 2012, 5:22:45 AM11/14/12
to erlang-q...@erlang.org
Hi!


On 11/13/2012 05:21 PM, JD Bothma wrote:
The 'ram' option to file:open/2 seems to implement some functionality I want: to treat a file in memory as if it's a file on disk to let a library support both disk and in-memory data concisely.

Yes, it's ancient functionality that has never been documented.
It doesn't look like this option is documented, but it's probably useful to many. It looks like it's used by at least erl_tar.

Can this become part of the documented API of the file module?
Yes, absolutely - we have no intention of removing it. It also has test suites. Just submit a documentation patch on Erlang-patches and you have a documented interface!

JD


Cheers,
Patrik
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Reply all
Reply to author
Forward
0 new messages