[erlang-questions] dets "undocumented" feature?

Dmitry Kolesnikov <>
Fri Feb 7 12:25:56 CET 2014


Ah, this is R16 feature! Thanks!

- Dmitry

On 07 Feb 2014, at 13:21, Evgeny M <> wrote:

> 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 
>  
> http://erlang.org/mailman/listinfo/erlang-questions 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140207/cec3e08a/attachment.html>


More information about the erlang-questions mailing list