distrax.utils.fileio.remove_file#

distrax.utils.fileio.remove_file(path, admin=False)[source]#

Remove a file at the path specified.

Parameters:
  • path (str) – The path to the file that will be removed

  • admin (bool) – To run under escalted privileges

Return type:

bool

Returns:

True if successful else False

Examples

>>> distrax.utils.fileio.remove_file("file_exists")
True
>>> distrax.utils.fileio.remove_file("non_existent_file")
False