Search code examples
erlangtext-filesdets

Erlang dets to txt


How can i write information which store in dets to txt file?

Thank you.


Solution

  • Since you've provided little to no information on what you mean or what you intend to do, the only advice I can give you is to read the dets manual. The functions you'll likely need are:

    • dets:open_file/1 or dets:open_file/2 to open the file that has the information in it.
    • dets:traverse/2 to walk over the data in your store passing in a fun that does whatever you want (in this case writing to a text file).
    • dets:close/1 to close the data store.

    If you want more specific advice or if you're thinking of something entirely different you'll have to ask a better question—one that has details, for example.