distrax.utils.fileio.change_permissions#

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

Change a files permission to the mode specified.

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.change_permissions("file", 0o775)
True
>>> distrax.utils.fileio.change_permissions("no_file",0o775)
False