MCPcopy Index your code
hub / github.com/github/copilot-sdk / stat

Method stat

python/copilot/session_fs_provider.py:196–216  ·  view source on GitHub ↗
(self, params: Any)

Source from the content-addressed store, hash-verified

194 return SessionFSExistsResult.from_dict({"exists": False})
195
196 async def stat(self, params: Any) -> SessionFSStatResult:
197 try:
198 info = await self._p.stat(params.path)
199 return SessionFSStatResult(
200 is_file=info.is_file,
201 is_directory=info.is_directory,
202 size=info.size,
203 mtime=info.mtime,
204 birthtime=info.birthtime,
205 )
206 except Exception as exc:
207 now = datetime.now(UTC)
208 err = _to_session_fs_error(exc)
209 return SessionFSStatResult(
210 is_file=False,
211 is_directory=False,
212 size=0,
213 mtime=now,
214 birthtime=now,
215 error=err,
216 )
217
218 async def mkdir(self, params: Any) -> SessionFSError | None:
219 try:

Callers

nothing calls this directly

Calls 3

_to_session_fs_errorFunction · 0.85
statMethod · 0.65
SessionFSStatResultClass · 0.50

Tested by

no test coverage detected