impure functionassertNew

Trigger an assert, if a file or directory exists

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

Information

Syntax

Files.assertNew(name);
Files.assertNew(name, message="This is not allowed");

Description

Triggers an assert, if "name" is an existing file or directory. The error message has the following structure:

File "<name>" already exists.
<message>

Inputs

TypeNameDefaultDescription
StringnameName of file or directory
Stringmessage"This is not allowed."Message that should be printed after the default message in a new line