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

Erlang File is_file Method

Files in Erlang

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

Syntax

is_file(filename)

Parameter

  • filename −Is it a filename, which is the filename that needs to be determined.

Return Value

True if the file exists and is indeed a file.

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

Output as true if the file exists

Files in Erlang