MCPcopy Create free account
hub / github.com/dagger/dagger / workdir

Method workdir

sdk/python/src/dagger/client/gen.py:4120–4152  ·  view source on GitHub ↗

Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution. Parameters ---------- path: Location of the directory to access (e.g., "."). exclude:

(
        self,
        path: str,
        *,
        exclude: list[str] | None = None,
        include: list[str] | None = None,
        gitignore: bool | None = False,
    )

Source from the content-addressed store, hash-verified

4118 return Directory(_ctx)
4119
4120 def workdir(
4121 self,
4122 path: str,
4123 *,
4124 exclude: list[str] | None = None,
4125 include: list[str] | None = None,
4126 gitignore: bool | None = False,
4127 ) -> "Directory":
4128 """Load a directory from the module's scratch working directory,
4129 including any changes that may have been made to it during module
4130 function execution.
4131
4132 Parameters
4133 ----------
4134 path:
4135 Location of the directory to access (e.g., ".").
4136 exclude:
4137 Exclude artifacts that match the given pattern (e.g.,
4138 ["node_modules/", ".git*"]).
4139 include:
4140 Include only artifacts that match the given pattern (e.g.,
4141 ["app/", "package.*"]).
4142 gitignore:
4143 Apply .gitignore filter rules inside the directory
4144 """
4145 _args = [
4146 Arg("path", path),
4147 Arg("exclude", [] if exclude is None else exclude, []),
4148 Arg("include", [] if include is None else include, []),
4149 Arg("gitignore", gitignore, False),
4150 ]
4151 _ctx = self._select("workdir", _args)
4152 return Directory(_ctx)
4153
4154 def workdir_file(self, path: str) -> "File":
4155 """Load a file from the module's scratch working directory, including any

Callers

nothing calls this directly

Calls 3

ArgClass · 0.90
_selectMethod · 0.80
DirectoryClass · 0.70

Tested by

no test coverage detected