Erlang - delete


Advertisements


This method is used to delete an existing file.

Syntax

delete(filename)

Parameters

filename − The name and destination of the file which needs to be deleted.

Return Value

None

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   file:delete("Duplicate.txt").

Output

If the file Duplicate.txt existed, it will be deleted.


erlang_file_input_output.htm

Advertisements
E-Books Store