# FileSystemManager.mkdirSync(string dirPath, boolean recursive)

The synchronous version of FileSystemManager.mkdir.

# Parameters

# string dirPath

Path to the created directory

# boolean recursive

Start from base library version 2.3.0. Please remaining backward compatible.

Indicates whether to create the directory after recursively creating the upper-layer directory. If the upper-layer directory already exists, do not create it. If dirPath is a/b/c/d and "recursive" is true, directory a will be created, and then directory b will be created under directory a, and so on, until directory d under directory a/b/c is created.

# Errors

Error Code Error Message Description
fail no such file or directory ${dirPath} The upper-layer directory does not exist
fail permission denied, open ${dirPath} No write permission on the specified filePath
fail file already exists ${dirPath} A file or directory with the same name already exists