unlink
Delete an entire directory tree
Parameters
| path |
Union[str, List[str]] |
Path to a directory or a list of directories |
required |
Returns
|
Union[None, List[None]] |
the result of the call to shutil.rmtree or a list of these results in case path is a list |
Examples
>>> from rlike import *
>>> folder = tempdir()
>>> a = tempfile(pattern = 'hello', fileext = '.txt', tmpdir = folder)
>>> b = tempfile(pattern = 'hello', fileext = '.txt', tmpdir = folder)
>>> test = list_files(folder)
>>> len(test)
2
>>> unlink(folder)
>>> file_exists([a, b])
[False, False]
>>> file_exists(folder)
False