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

Method rm

test/BoostBuild.py:376–402  ·  view source on GitHub ↗
(self, names)

Source from the content-addressed store, hash-verified

374 os.utime(path, None)
375
376 def rm(self, names):
377 if not type(names) == types.ListType:
378 names = [names]
379
380 if names == ["."]:
381 # If we are deleting the entire workspace, there is no need to wait
382 # for a clock tick.
383 self.last_build_timestamp = 0
384
385 # Avoid attempts to remove the current directory.
386 os.chdir(self.original_workdir)
387 for name in names:
388 n = glob.glob(self.native_file_name(name))
389 if n: n = n[0]
390 if not n:
391 n = self.glob_file(name.replace("$toolset", self.toolset + "*")
392 )
393 if n:
394 if os.path.isdir(n):
395 shutil.rmtree(n, ignore_errors=False)
396 else:
397 os.unlink(n)
398
399 # Create working dir root again in case we removed it.
400 if not os.path.exists(self.workdir):
401 os.mkdir(self.workdir)
402 os.chdir(self.workdir)
403
404 def expand_toolset(self, name):
405 """

Callers 15

test_basicFunction · 0.95
test_basicFunction · 0.95
test_exitFunction · 0.95
inline.pyFile · 0.80
stage.pyFile · 0.80
rescan_header.pyFile · 0.80
prebuilt.pyFile · 0.80
setup_archiveFunction · 0.80
test_glob_archiveFunction · 0.80

Calls 3

native_file_nameMethod · 0.95
glob_fileMethod · 0.95
unlinkMethod · 0.80

Tested by 6

test_basicFunction · 0.76
test_basicFunction · 0.76
test_exitFunction · 0.76
test_glob_archiveFunction · 0.64
test_oneFunction · 0.64