[erlang-questions] dets "undocumented" feature?

Evgeny M donpedrothird@REDACTED
Fri Feb 7 12:47:05 CET 2014


It works at least from R15B1

пятница, 7 февраля 2014 г., 15:25:56 UTC+4 пользователь Dmitry Kolesnikov 
написал:
>
> Ah, this is R16 feature! Thanks!
>
> - Dmitry
>
> On 07 Feb 2014, at 13:21, Evgeny M <donped...@REDACTED <javascript:>> 
> 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 
>> erlang-q...@REDACTED 
>> http://erlang.org/mailman/listinfo/erlang-questions 
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140207/97162bc8/attachment.htm>


More information about the erlang-questions mailing list