---
schema_version: "1"
id: e81870b6339d57863e68f22bd203ed71635ad22ac2c755bec31838d47467fce4
title: 動的ディレクトリ
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/munit/3.0/dynamic-directories.md
canonical_url: https://docs.mulesoft.com/jp/munit/3.0/dynamic-directories
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 34a324841cd3e6ac6440d62e4905bd5c2a6f433a5f8e188ce8a9b5a88490a451
description: MuleSoft Documentation Site
release: "3.0"
latest: false
---
# 動的ディレクトリ

テスト中にファイルとフォルダーを管理する場合、MUnit によって一時ディレクトリを参照する ​`munit.temporary.directory`​ プロパティが提供されます。このディレクトリ内にファイルとフォルダーを作成して、テストで使用できます。

一時ディレクトリは、各テストの終了時に削除されます。

たとえば、ファイルコネクタを使用して、次のように作業ディレクトリを設定できます。

```xml
<file:config name="tmpDir">
    <file:connection workingDir="${munit.temporary.directory}"/>
</file:config>
```

次に、それを使用してその中にファイル/フォルダーを作成します。

```xml
<file:create-directory config-ref="tmpDir" directoryPath="example"/>
```

## [](#関連情報)関連情報

- [動的ポート](https://docs.mulesoft.com/jp/munit/3.0/dynamic-ports)