Erlang Central

File exist

Revision as of 07:11, 15 October 2007 by Rubysolo (Talk | contribs)

The function filelib:is_regular/1 could be used to verify that an file do exist or dose not exist.

Here is a example:

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