In this guide, we will discuss Erlang make_dir. This method is used to create a new directory.
Syntax
make_dir(directory)
Parameters
- directory − This is the name of the directory which needs to be created.
Return Value
A status on the directory creation operation. If this is successful, an {Ok} message will be displayed.
For example
-module(helloworld). -export([start/0]). start() -> io:fwrite("~p~n",[file:make_dir("newdir")]).
Output
The directory called newdir will be created.
Next Topic : Click Here
Pingback: Erlang - list_dir | Adglob Infosystem Pvt Ltd
Pingback: Erlang - File I/O | Adglob Infosystem Pvt Ltd