distrax.utils.fileio.recursive_change_permissions#

distrax.utils.fileio.recursive_change_permissions(path, mode)[source]#

Recursively change the permissions of a directory and the files to the mode.

Parameters:
  • path (str) – Path of the file to change

  • mode (int) – Octal number of linux permissions i.e. 0o755

Return type:

bool

Returns:

True if successful else False

Examples

>>> distrax.utils.fileio.recursive_change_permissions("folder", 0o775)
True
>>> distrax.utils.fileio.recursive_change_permissions("no_folder",0o775)
False