Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_util.cpython-313.pyc26 linesDownload Raw Back to __pycache__
1�

2�j���`�SSKJr SSKrSSKrSSKrSSKJrJr SSKJ	r	 S	Sjr3S4SjrSS/rg)�)�annotationsN)�EACCES�EISDIR)�Pathc��[R"U5nURS:wa�UR[R5-(d[
[SU5e[R"UR5(a6[RS:Xa[
[SU5e[[SU5egg![a gf=f)a6Raise an exception if attempting to open the file for writing would fail.7 8This is done so files that will never be writable can be separated from files that are writable but currently9locked.10 11:param filename: file to check12 13:raises OSError: as if the file was opened for writing.14 15NrzPermission denied�win32zIs a directory)
�os�stat�OSError�st_mtime�st_mode�S_IWUSR�PermissionErrorr�S_ISDIR�sys�platform�IsADirectoryErrorr)�filename�	file_stats  �TD:\code\apps\devtools\python\user_packages\Python313\site-packages\filelock/_util.py�raise_on_not_writable_filer16s�����G�G�H�%�	����Q���!�!�D�L�L�0�!�&�*=�x�H�H��<�<�	�)�)�*�*��|�|�w�&�%�f�.A�8�L�L�(��0@�(�K�K�
+�	������s�B8�817C�Cc�J�[U5RRSSS9 g)zd18Ensure the directory containing the file exists (create it if necessary).19 20:param filename: file.21 22T)�parents�exist_okN)r�parent�mkdir)rs r�ensure_directory_existsr(s!��	��N������t��<�rr)r�str�return�None)rz23Path | strr r!)
�24__future__rr	r25r�errnorr�pathlibrrr�__all__�rr�<module>r's1��"�	��26� ��L�<=�� ��r
codekingpro/portable-devtools · Team Ai