Find a requested static file in a location and return the found absolute path (or ``None`` if no match).
(self, root, path, prefix=None)
| 118 | return matches |
| 119 | |
| 120 | def find_location(self, root, path, prefix=None): |
| 121 | """ |
| 122 | Find a requested static file in a location and return the found |
| 123 | absolute path (or ``None`` if no match). |
| 124 | """ |
| 125 | if prefix: |
| 126 | prefix = "%s%s" % (prefix, os.sep) |
| 127 | if not path.startswith(prefix): |
| 128 | return None |
| 129 | path = path.removeprefix(prefix) |
| 130 | path = safe_join(root, path) |
| 131 | if os.path.exists(path): |
| 132 | return path |
| 133 | |
| 134 | def list(self, ignore_patterns): |
| 135 | """ |