Returns the absolute location of ``path`` relative to ``root``. ``root`` is the path configured for this `StaticFileHandler` (in most cases the ``static_path`` `Application` setting). This class method may be overridden in subclasses. By default it returns a filesy
(cls, root: str, path: str)
| 2750 | |
| 2751 | @classmethod |
| 2752 | def get_absolute_path(cls, root: str, path: str) -> str: |
| 2753 | """Returns the absolute location of ``path`` relative to ``root``. |
| 2754 | |
| 2755 | ``root`` is the path configured for this `StaticFileHandler` |
| 2756 | (in most cases the ``static_path`` `Application` setting). |
| 2757 | |
| 2758 | This class method may be overridden in subclasses. By default |
| 2759 | it returns a filesystem path, but other strings may be used |
| 2760 | as long as they are unique and understood by the subclass's |
| 2761 | overridden `get_content`. |
| 2762 | |
| 2763 | .. versionadded:: 3.1 |
| 2764 | """ |
| 2765 | abspath = os.path.abspath(os.path.join(root, path)) |
| 2766 | return abspath |
| 2767 | |
| 2768 | def validate_absolute_path(self, root: str, absolute_path: str) -> Optional[str]: |
| 2769 | """Validate and return the absolute path. |
no test coverage detected