pyguymer3.perms

pyguymer3.perms(path, /, *, allowHidden=False, debug=True, ensureNFC=True, filePerms=None, folderPerms=None, follow_symlinks=True, group=None, return_dsstore=True, return_symlinks=False, skips=None, user=None)[source]

Set permissions within a path.

This function sets the file/folder mode and group/user owner of all files and folders within the path.

Parameters:
  • path (str) – the path to set permissions within

  • allowHidden (bool, optional) – allow hidden files

  • debug (bool, optional) – print debug messages

  • ensureNFC (bool, optional) – ensure that the Unicode encoding is NFC

  • filePerms (int, default=None) – desired file mode (recommended to supply integer in octal to improve clarity)

  • folderPerms (int, default=None) – desired folder mode (recommended to supply integer in octal to improve clarity)

  • group (str, default=None) – desired group owner

  • user (str, default=None) – desired user owner

  • follow_symlinks (bool, optional) – follow symbolic links

  • return_dsstore (bool, optional) – include “.DS_Store” files in the returned list

  • return_symlinks (bool, optional) – set permissions on symbolic links

  • skips (list of str, default=[]) – a list of strings which, if any are present in a file/folder name, result in the file/folder being skipped

Notes

Copyright 2017 Thomas Guymer [1]

References