%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/thorium/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/thorium/file.pyo

�
���^c@@sbdZddlmZmZmZddlZddlZddlZddl	Ze
d�ZdS(u�
Writes matches to disk to verify activity, helpful when testing

Normally this is used by giving the name of the file (without a path) that the
data will be saved to. If for instance you use ``foo`` as the name:

.. code-block: yaml

    foo:
      file.save

Then the file will be saved to:

.. code-block: bash

    <salt cachedir>/thorium/saves/foo

You may also provide an absolute path for the file to be saved to:

.. code-block:: yaml

    /tmp/foo.save:
        file.save

Files will be saved in JSON format. However, JSON does not support ``set()``s.
If you are saving a register entry that contains a ``set()``, then it will fail
to save to JSON format. However, you may pass data through a filter which makes
it JSON compliant:

.. code-block:: yaml

    foo:
      file.save:
        filter: True

Be warned that if you do this, then the file will be saved, but not in a format
that can be re-imported into Python.
i(tabsolute_importtprint_functiontunicode_literalsNcC@si|d6id6dd6td6}|jd�rLtjj|�}|}n1tjjtddd	�}tjj||�}tjj|�s�tj|�nt	j
jj|d
��Q}|tkr�t	j
j
jt	j
jjt�|�nt	j
j
jt|�WdQX|S(uB
    Save the register to <salt cachedir>/thorium/saves/<name>, or to an
    absolute path.

    If an absolute path is specified, then the directory will be created
    non-recursively if it doesn't exist.

    USAGE:

    .. code-block:: yaml

        foo:
          file.save

        /tmp/foo:
          file.save
    unameuchangesuucommenturesultu/ucachediruthoriumusavesuw+N(tTruet
startswithtostpathtdirnametjoint__opts__tisdirtmakedirstsalttutilstfilestfopentjsontdumptdatatsimple_types_filtert__reg__(tnametfiltertretttgt_dirtfn_tfp_((s5/usr/lib/python2.7/site-packages/salt/thorium/file.pytsave3s 

	((t__doc__t
__future__RRRRtsalt.utils.dataRtsalt.utils.filestsalt.utils.jsontFalseR(((s5/usr/lib/python2.7/site-packages/salt/thorium/file.pyt<module>'s

Zerion Mini Shell 1.0