MCPcopy Index your code
hub / github.com/fastapi/fastapi / seek

Method seek

fastapi/datastructures.py:104–122  ·  view source on GitHub ↗

Move to a position in the file. Any next read or write will be done from that position. To be awaitable, compatible with async, this is run in threadpool.

(
        self,
        offset: Annotated[
            int,
            Doc(
                """
                The position in bytes to seek to in the file.
                """
            ),
        ],
    )

Source from the content-addressed store, hash-verified

102 return await super().read(size)
103
104 async def seek(
105 self,
106 offset: Annotated[
107 int,
108 Doc(
109 """
110 The position in bytes to seek to in the file.
111 """
112 ),
113 ],
114 ) -> None:
115 """
116 Move to a position in the file.
117
118 Any next read or write will be done from that position.
119
120 To be awaitable, compatible with async, this is run in threadpool.
121 """
122 return await super().seek(offset)
123
124 async def close(self) -> None:
125 """

Callers 1

test_upload_fileFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_upload_fileFunction · 0.76