---
schema_version: "1"
id: ee2ed4bc62eb208b905ff2986471e1415e777e01e2fa4a378b25ed2ee64986f9
title: 動的ディレクトリ
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/munit/2.3/dynamic-directories.md
canonical_url: https://docs.mulesoft.com/jp/munit/2.3/dynamic-directories
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ce6ef9010d53852cd13208204b71c5e808a0bca555ed44a7299da7c5b8a35aed
description: MuleSoft Documentation Site
release: "2.3"
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/2.3/dynamic-ports)