impure functionremove

Remove file or directory (ignore call, if it does not exist)

Extends from Modelica.Icons.Function (Icon for functions).

Information

Syntax

Files.remove(name);

Description

Removes the file or directory "name". If "name" does not exist, the function call is ignored. If "name" is a directory, first the content of the directory is removed and afterwards the directory itself.

This function is silent, i.e., it does not print a message.

Inputs

TypeNameDefaultDescription
StringnameName of file or directory to be removed

Contents

NameDescription
removeDirectoryprotectedRemove a directory, even if it is not empty
removeDirectoryContentsprotected