English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Erlang File is_dir

Files in Erlang

This method is used to determine whether the directory is indeed a directory. This is part of the filelib library.

Syntax

is_dir(directoryname)

Parameters

  • directoryname −This is the directory name, do you need to determine the directory name?

Return Value

If the directory exists and is indeed a directory, it returns True.

-module(helloworld). 
-export([start/0]). 
start() -> 
   io:fwrite("~p~n",[filelib:is_dir("newdir")]).

If the directory exists, it outputs true.

Files in Erlang