File exist

From Erlang Community

Revision as of 07:11, 15 October 2007 by Andreas.hillqvist (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
Erlang/OTP Projects
Personal tools