pyslk.resource_permissions_raw

pyslk.resource_permissions_raw#

pyslk.resource_permissions_raw(resource_path: str | Path | None = None, resource_id: str | int | None = None, as_octal_number: bool = False, return_type: int = 0) str | int | CompletedProcess#

Get permissions of a resource provided via resource id or a resource path

Parameters:
  • resource_path (str or path-like) – resource path (either resource_id or resource_path have to be provided; not both)

  • resource_id (str or int) – a resource id

  • as_octal_number (bool) – Do not return the permissions as combination of x/w/r/- but as three digit octal number

  • return_type (int) – select between 0 (== str output), 1 (== exit code), 2 (subprocess output)

Returns:

stdout of the slk call

Return type:

Union[str, int, subprocess.CompletedProcess]