%% From the Erlang shell, or in a program, match {ok, []}.
%% If this works the directory is empty.

3> {ok, []} = file:list_dir_all("/usr").   
** exception error: no match of right hand side value 
                    {ok,["X11R6","X11","standalone","share","sbin","local",
                         "libexec","lib","bin"]}
4> {ok, []} = file:list_dir_all("/asd").
** exception error: no match of right hand side value {error,enoent}
5> {ok, []} = file:list_dir_all("./empty").
{ok,[]}

Erlang相关代码片段

erlang folder is empty

erlang run on start

erlang distributed mode short name

hashtag operator erlang

erlang {error,{"no such file or directory" .app

erlang list comprehension

hello world in erlang

make file erlang

get port erlang

tcp server erlang

tcp client erlang

erlang exit from shell

get erlang version