[erlang-questions] dets "undocumented" feature?

Dmitry Kolesnikov dmkolesnikov@REDACTED
Fri Feb 7 12:09:58 CET 2014


I was constantly having a trouble with dets:open_file interface.

open_file(Name, Args) -> {ok, Name} | {error, Reason}
 Name = atom()

Using atom() as dets identifier is not always practical, however I see the major reasons behind it. 

Recently I’ve discovered that following statements works perfectly:

{ok, R1} = dets:open_file(erlang:make_ref(), [{file, "/tmp/myfile"}, {access, read}]).
This is “long seemed” solution. When I need to temporary open dets file for reading.

do you have any insides? how safe is that to put into production?

Best Regards, 

More information about the erlang-questions mailing list