assertNew

Trigger an assert, if a file or directory exists

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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>

Syntax

assertNew(name, message)

Inputs (2)

name

Type: String

Description: Name of file or directory

message

Default Value: "This is not allowed."

Type: String

Description: Message that should be printed after the default message in a new line