
    Vhr                     2    d dl mZmZmZ eZd dlZd dlZd Zy)    )absolute_importdivisionprint_functionNc                 `   | j                  | j                        }t        j                  d      \  }}	 t	        j
                  |       | j                  |       	 	 t	        j                  |t        j                  t        j                  z  t        j                  z  d      }t	        j                  ||       t	        j
                  |       t        j                   j#                  |d         r| j%                  |d       | j'                  t        j                   j)                  |      t        j                   j)                  |d                | j%                  |d       y# t        $ r Y 'w xY w# t        $ rQ}	 t	        j                  |       n# t        $ r Y nw xY w| j                  dj                  |             Y d}~d}~ww xY w# t        $ rQ}	 t	        j                  |       n# t        $ r Y nw xY w| j                  d	j                  |             Y d}~yd}~ww xY w)
zl
    Writes content into destination file as securely as possible.
    Uses file arguments from module.
    s   .ansible_tmp)prefixi  z3Error while writing result into temporary file: {0})msgNpathFzError while writing result: {0})load_file_common_argumentsparamstempfilemkstemposclose	Exceptionadd_cleanup_fileopenO_WRONLYO_CREATO_TRUNCwriteremove	fail_jsonformatr	   existsset_fs_attributes_if_differentatomic_moveabspath)modulecontent	file_argstmp_fdtmp_namefilees          j/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/sops/plugins/module_utils/io.py
write_filer&      s    11&--@I''?FH
 H%J
	b778R[[2::%=

%JERDHHT7#HHTN 77>>)F+,11)UC277??84bggooiPVFW6XY--i?+    	b		(# !V!]!]^_!`aa	b  J	IIh 		>EEaHIIJs   E& A2E6 BG &	E32E36	G FG	F"G!F""$GG GG 	H-G32H(3	G?<H(>G??$H((H-)	
__future__r   r   r   type__metaclass__r   r   r&        r%   <module>r,      s!   
 A @ 
 
&Jr+   