HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/root/usr/local/lib/python3.10/dist-packages/filelock/__pycache__/_util.cpython-310.pyc
o

j�h��@s`ddlmZddlZddlZddlZddlmZmZddlm	Z	dd	d
�Z
ddd
�Zd
d
gZdS)�)�annotationsN)�EACCES�EISDIR)�Path�filename�str�return�NonecCs|zt�|�}Wn
tyYdSw|jdkr:|jtj@s#ttd|��t�|j�r<t	j
dkr4ttd|��ttd|��dSdS)a3
    Raise an exception if attempting to open the file for writing would fail.

    This is done so files that will never be writable can be separated from files that are writable but currently
    locked.

    :param filename: file to check
    :raises OSError: as if the file was opened for writing.

    NrzPermission denied�win32zIs a directory)
�os�stat�OSError�st_mtime�st_mode�S_IWUSR�PermissionErrorr�S_ISDIR�sys�platform�IsADirectoryErrorr)r�	file_stat�r�9/usr/local/lib/python3.10/dist-packages/filelock/_util.py�raise_on_not_writable_file
s�

�r�
Path | strcCst|�jjddd�dS)zp
    Ensure the directory containing the file exists (create it if necessary).

    :param filename: file.

    T)�parents�exist_okN)r�parent�mkdir)rrrr�ensure_directory_exists'sr)rrrr	)rrrr	)
�
__future__rrrr�errnorr�pathlibrrr�__all__rrrr�<module>s

�