[erlang-questions] dets "undocumented" feature?
Evgeny M
donpedrothird@REDACTED
Fri Feb 7 12:21:23 CET 2014
Name = term() %%http://www.erlang.org/doc/man/dets.html#type-tab_name
пятница, 7 февраля 2014 г., 15:09:58 UTC+4 пользователь Dmitry Kolesnikov
написал:
>
> Hello,
>
> 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,
> Dmitry
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@REDACTED <javascript:>
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140207/e4932e1c/attachment.htm>
More information about the erlang-questions
mailing list