MCPcopy Create free account
hub / github.com/catboost/catboost / resfs_resolve

Function resfs_resolve

library/python/runtime_py3/__res.py:229–240  ·  view source on GitHub ↗

Return the absolute path of a root-relative path if it exists.

(path, check_existence=True)

Source from the content-addressed store, hash-verified

227
228
229def 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
243def resfs_src(key, resfs_file=False):

Callers 6

resfs_readFunction · 0.85
get_dataMethod · 0.85
get_sourceMethod · 0.85
get_codeMethod · 0.85
path_statsMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected