Return the absolute path of a root-relative path if it exists.
(path, check_existence=True)
| 227 | |
| 228 | |
| 229 | def resfs_resolve(path, check_existence=True): |
| 230 | """ |
| 231 | Return the absolute path of a root-relative path if it exists. |
| 232 | """ |
| 233 | path = _b(path) |
| 234 | if Y_PYTHON_SOURCE_ROOT: |
| 235 | if not path.startswith(Y_PYTHON_SOURCE_ROOT): |
| 236 | path = _b(path_sep).join((Y_PYTHON_SOURCE_ROOT, path)) |
| 237 | if not check_existence: |
| 238 | return path |
| 239 | if _path_isfile(path): |
| 240 | return path |
| 241 | |
| 242 | |
| 243 | def resfs_src(key, resfs_file=False): |
no test coverage detected