Erlang – make_dir

Erlang make_dir

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

This Post Has 2 Comments

Leave a Reply