> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kasoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# fileMakeDir

> 创建目录，可选择创建任何缺失的父目录。

创建路径指定的目录。

## 必需的参数

* **path**: 要创建的目录的完全限定路径（例如，`/tmp/mydirectory`）。

## 可选的参数

* **force**：控制操作是否在 **path** 参数中设置的路径中创建丢失的目录。 允许的值为`true`和`false`。 默认值为`true`。

## 输出属性

* **file:path**：新创建目录的完整路径。
* **file:cdate**：目录创建的日期和时间。

## 示例

```xml theme={null}
<!-- Creating an input item with the path attribute --> 
<arc:set attr="input.path" value="/tmp/foo/bar/newdir"/>
<!-- Calling fileMakeDir and passing in the input item -->
<arc:call op="fileMakeDir" in="input" out="result">
  <!-- Optional: Logging information about the created directory to the application log -->
  <arc:set attr="_log.info" value="A new directory located at [result.file:path], was created at [result.file:cdate]."/>  
</arc:call> 
```
