docs/current_docs/partials/cookbook/filesystems/_set-module-default.mdx
The following Dagger module uses a constructor to set a module-wide Directory argument and point it to a default path on the host. This eliminates the need to pass a common Directory argument individually to each Dagger Function in the module. If required, the default path can be overridden by specifying a different Directory value at call time.
Examples
Call the Dagger Function without arguments. The default path (the current directory .) is used:
<Tabs groupId="shell">
<TabItem value="System shell">
```shell
dagger -c foo
```
</TabItem>
<TabItem value="Dagger Shell">
```shell title="First type 'dagger' for interactive mode."
foo
```
</TabItem>
<TabItem value="Dagger CLI">
```shell
dagger call foo
```
</TabItem>
</Tabs>
Call the Dagger Function with a constructor argument. The specified directory (/src/myapp) is used:
<Tabs groupId="shell">
<TabItem value="System shell">
```shell
dagger -c 'my-module --source $(host | directory /src/myapp) | foo'
```
</TabItem>
<TabItem value="Dagger Shell">
```shell title="First type 'dagger' for interactive mode."
my-module --source $(host | directory /src/myapp) | foo
```
</TabItem>
<TabItem value="Dagger CLI">
```shell
dagger call --source=/src/myapp foo
```
</TabItem>
</Tabs>