createDirectory

Create directory (if directory already exists, ignore call)

Information

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

Syntax

Files.createDirectory(directoryName);

Description

Creates directory "directoryName". If this directory already exists, the function call is ignored. If several directories in "directoryName" do not exist, all of them are created. For example, assume that directory "E:/test1" exists and that directory "E:/test1/test2/test3" shall be created. In this case the directories "test2" in "test1" and "test3" in "test2" are created.

This function is silent, i.e., it does not print a message. In case of error (e.g., "directoryName" is an existing regular file), an assert is triggered.

Syntax

createDirectory(directoryName)

Inputs (1)

directoryName

Type: String

Description: Name of directory to be created (if present, ignore call)