HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/core20/current/usr/share/subiquity/subiquitycore/__pycache__/file_util.cpython-38.pyc
U

K��^@�@s*ddlZddlZddlZdZddd�ZdS)�Ni��wbFc
Cs�|dkrt}|r@zt�|�}t�|j�}Wntk
r>YnXd}zJtjtj�	|�d|d�}|�
|�|��t�|j
|�t�|j
|�Wn:tk
r�}z|dk	r�t�|j
�|�W5d}~XYnXdS)zbAtomically write filename.
    open filename in mode 'omode', write content, chmod to 'mode'.
    NF)�dir�delete�mode)�
_DEF_PERMS�os�stat�S_IMODE�st_mode�OSError�tempfileZNamedTemporaryFile�path�dirname�write�close�chmod�name�rename�unlink)�filenameZcontentrZomodeZ	copy_modeZ	file_statZtf�e�r�//usr/share/subiquity/subiquitycore/file_util.py�
write_files,
�
r)NrF)rrrrrrrrr�<module>s