distrax.utils.fileio.remove_dir#

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

Remove a directory and contents of the path specified.

Parameters:
  • path (str) – The path to the folder

  • admin (bool) – To run under escalted privileges

Return type:

bool

Returns:

True if successful else False

Examples

>>> distrax.utils.fileio.remove_dir("folder_exists")
True
>>> distrax.utils.fileio.remove_dir("non_existent_folder")
False