iex(1)> :dets.open_file(:storage, [{:type, :set}])
{:ok, :storage}
当我尝试使用其他参数时,对于Erlang文档来说这应该是完全正确的:
iex(2)> :dets.open_file(:storage, [{:type, :set}, {:file, "file"}])
** (ArgumentError) argument error
UPD:
iex(4)> :dets.open_file(:storage, [{:type, :set}, {:file, 'file'}])
{:error, :incompatible_arguments}
答案 0 :(得分:0)
尝试
:dets.open_file('file', [{:type, :set}])