In this guide, we will discuss Erlang is_dir. This method is used to determine if a directory is indeed a directory. This method is a part of the filelib library.
Syntax
is_dir(directoryname)
Parameters
- directoryname − This is the directory name for which it needs to be determined if it is a directory or not.
Return Value
True, if the directory exists and is indeed a directory.
For example
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[filelib:is_dir("newdir")]).
Output
If the directory exists, the output will be true.
Next Topic : Click Here
Pingback: Erlang - is_file | Adglob Infosystem Pvt Ltd
Pingback: Erlang - File I/O | Adglob Infosystem Pvt Ltd