%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/mac_xattr.pyc

�
���^c@@sndZddlmZmZmZddlZddlZeje�Z	dZ
d�Zd�Zd�Z
dS(ue
Allows you to manage extended attributes on files or directories
================================================================

Install, enable and disable assistive access on macOS minions

.. code-block:: yaml

    /path/to/file:
      xattr.exists:
        - attributes:
            - com.file.attr=test
            - com.apple.quarantine=0x00001111
i(tabsolute_importtunicode_literalstprint_functionNuxattrcC@stddkrtStS(u
    Only work on Mac OS
    uosuMacOSuDarwin(uMacOSuDarwin(t
__grains__t__virtualname__tFalse(((s9/usr/lib/python2.7/site-packages/salt/states/mac_xattr.pyt__virtual__sc
	C@s�i|d6td6dd6id6}tjj|�sLt|d<d|d<|Std|�}|j�}x�|D]�}|jd�\}}|jd	�}|r�td
||dt�j	dd�j	d
d�||<|dj	dd�}n||krt}	n&|||kp%|o%|||k}	||kr@|	r@qoqo||d|<td||||�qoWt
|dj��dkr�d|d<n|S(up
    Make sure the given attributes exist on the file/directory

    name
        The path to the file/directory

    attributes
        The attributes that should exist on the file/directory, this is accepted as
        an array, with key and value split with an equals sign, if you want to specify
        a hex value then add 0x to the beginning of the value.

    unameuresultuucommentuchangesuFile or directory doesn't existu
xattr.listu=u0xu
xattr.readthexu u
iuxattr.writeiuAll values existed correctly.(tTruetostpathtexistsRt__salt__tkeystsplitt
startswithtreplacetlen(
tnamet
attributestrett
current_attrstcurrent_idstattrtattr_idtattr_valtattr_hext
value_matches((s9/usr/lib/python2.7/site-packages/salt/states/mac_xattr.pyR#s6




5	
cC@s�i|d6td6dd6id6}tjj|�sLt|d<d|d<|Std|�}|j�}x<|D]4}||krotd||�d	|d|<qoqoWt|dj��d
kr�d|d<n|S(u�
    Make sure the given attributes are deleted from the file/directory

    name
        The path to the file/directory

    attributes
        The attributes that should be removed from the file/directory, this is accepted as
        an array.
    unameuresultuucommentuchangesuFile or directory doesn't existu
xattr.listuxattr.deleteudeleteiu$All attributes were already deleted.(RR	R
RRRR
R(RRRRRR((s9/usr/lib/python2.7/site-packages/salt/states/mac_xattr.pytdeleteXs"





(t__doc__t
__future__RRRtloggingR	t	getLoggert__name__tlogRRRR(((s9/usr/lib/python2.7/site-packages/salt/states/mac_xattr.pyt<module>s			5

Zerion Mini Shell 1.0