MCPcopy Create free account
hub / github.com/boostorg/build / __makedirs

Method __makedirs

v2/test/BoostBuild.py:958–979  ·  view source on GitHub ↗

Creates a folder with the given path, together with any missing parent folders. If WAIT is set, makes sure any newly created folders have modification timestamps newer than the ones left behind by the last build run.

(self, path, wait)

Source from the content-addressed store, hash-verified

956 list[:] = filter(lambda x, w=wildcard: not fnmatch.fnmatch(x, w), list)
957
958 def __makedirs(self, path, wait):
959 """
960 Creates a folder with the given path, together with any missing
961 parent folders. If WAIT is set, makes sure any newly created folders
962 have modification timestamps newer than the ones left behind by the
963 last build run.
964
965 """
966 try:
967 if wait:
968 stack = []
969 while path and path not in stack and not os.path.isdir(path):
970 stack.append(path)
971 path = os.path.dirname(path)
972 while stack:
973 path = stack.pop()
974 os.mkdir(path)
975 self.__ensure_newer_than_last_build(path)
976 else:
977 os.makedirs(path)
978 except Exception:
979 pass
980
981 def __python_timestamp_resolution(self, path, minimum_resolution):
982 """

Callers 1

writeMethod · 0.95

Calls 2

appendMethod · 0.80

Tested by

no test coverage detected