Getting started Community Training Tutorials Documentation APIs, AI & Tools
<file:config name="tmpDir">
<file:connection workingDir="${munit.temporary.directory}"/>
</file:config>
Dynamic Directories
Dynamic Directories
Anypoint Code Builder
Anypoint Studio
When managing files and folders during a test, MUnit provides the munit.temporary.directory property to reference a temporary directory. You can create files and folders inside this directory to use in your tests.
The temporary directory is deleted at the end of each test.
For example, using the file connector, you could configure the working directory as follows:
<file:config name="tmpDir">
<file:connection workingDir="${munit.temporary.directory}"/>
</file:config>
And then use it to create files/folders inside it:
<file:create-directory config-ref="tmpDir" directoryPath="example"/>