file_remove
file_remove(path)
Remove files
Args: path (str | List[str]): Path to a file or a list of files
Returns: the result of the call to os.remove or a list of these results in case path is a list
Examples: >>> from rlike import * >>> x = tempfile(pattern = ‘hello’, fileext = ‘.txt’) >>> test = file_exists(x) >>> test True >>> test = file_remove(x) >>> test = file_exists(x) >>> f1 = writeLines(text = ‘Hello world. Some more text.’, con = ‘fname1.txt’) >>> f2 = writeLines(text = ‘Hello world. Some more text.’, con = ‘fname2.txt’) >>> test = file_exists([f1, f2]) >>> test [True, True] >>> test = file_remove([f1, f2]) >>> test [None, None]