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

Method contents

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

Retrieves the contents of the file. Parameters ---------- offset_lines: Start reading after this line limit_lines: Maximum number of lines to read Returns ------- str The `String` scalar type represents tex

(
        self,
        *,
        offset_lines: int | None = None,
        limit_lines: int | None = None,
    )

Source from the content-addressed store, hash-verified

8065 return File(_ctx)
8066
8067 async def contents(
8068 self,
8069 *,
8070 offset_lines: int | None = None,
8071 limit_lines: int | None = None,
8072 ) -> str:
8073 """Retrieves the contents of the file.
8074
8075 Parameters
8076 ----------
8077 offset_lines:
8078 Start reading after this line
8079 limit_lines:
8080 Maximum number of lines to read
8081
8082 Returns
8083 -------
8084 str
8085 The `String` scalar type represents textual data, represented as
8086 UTF-8 character sequences. The String type is most often used by
8087 GraphQL to represent free-form human-readable text.
8088
8089 Raises
8090 ------
8091 ExecuteTimeoutError
8092 If the time to execute the query exceeds the configured timeout.
8093 QueryError
8094 If the API returns an error.
8095 """
8096 _args = [
8097 Arg("offsetLines", offset_lines, None),
8098 Arg("limitLines", limit_lines, None),
8099 ]
8100 _ctx = self._select("contents", _args)
8101 return await _ctx.execute(str)
8102
8103 async def digest(
8104 self,

Callers 15

testGitMethod · 0.95
test_git_repositoryFunction · 0.45
test_host_directoryFunction · 0.45
connect.spec.tsFile · 0.45
api.spec.tsFile · 0.45
testDirectoryMethod · 0.45
testContainerMethod · 0.45
mainMethod · 0.45
advanced_directoryMethod · 0.45
advancedDirectoryMethod · 0.45
simple_directoryMethod · 0.45
simpleDirectoryMethod · 0.45

Calls 3

ArgClass · 0.90
_selectMethod · 0.80
executeMethod · 0.45

Tested by 5

testGitMethod · 0.76
test_git_repositoryFunction · 0.36
test_host_directoryFunction · 0.36
testDirectoryMethod · 0.36
testContainerMethod · 0.36