Erlang Central

File exist

Revision as of 08:14, 12 October 2007 by Rubysolo (Talk | contribs)

There are many ways to test if a file exists in Erlang. Here are some examples:

case filelib:is_regular(Name) of
true ->
    io:format("File exist.\n");
false ->
    io:format("File dose not exist.\n")
end