Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readlines(FileName) ->
- {ok, Device} = file:open(FileName, [read]),
- try get_all_lines(Device)
- after file:close(Device)
- end.
- get_all_lines(Device) ->
- case file:read_line(Device) of
- {ok,Data} ->[string:trim(Data)|get_all_lines(Device)];
- _->[]
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement