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

Method _check_fallback_file

fastapi/routing.py:1877–1884  ·  view source on GitHub ↗
(self, fallback: str)

Source from the content-addressed store, hash-verified

1875 self._check_fallback_file(fallback)
1876
1877 def _check_fallback_file(self, fallback: str) -> None:
1878 _, stat_result = self.lookup_path(fallback)
1879 if stat_result is None or not stat.S_ISREG(stat_result.st_mode):
1880 raise RuntimeError(
1881 f"Frontend fallback file '{fallback}' does not exist in "
1882 f"directory '{self.directory}'. Resolved absolute directory: "
1883 f"'{self._get_resolved_directory()}'"
1884 )
1885
1886 def _get_resolved_directory(self) -> str:
1887 assert self.directory is not None

Callers 1

__init__Method · 0.95

Calls 1

Tested by

no test coverage detected