bg^ddlmZddlZddlZddlZddlmZmZddlm Z dd Z dd Z d d gZ dS)) annotationsN)EACCESEISDIR)PathfilenamestrreturnNonecl tj|}n#t$rYdSwxYw|jdkr|jtjzst td|tj|jr>tj dkrt td|ttd|dSdS)a/ 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 deniedwin32zIs a directory) osstatOSErrorst_mtimest_modeS_IWUSRPermissionErrorrS_ISDIRsysplatformIsADirectoryErrorr)r file_stats _/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/filelock/_util.pyraise_on_not_writable_filer sGH%% Q!DL0 I!&*=xHH H < ) * * L|w&&%f.A8LLL(0@(KKK L Ls  %% Path | strcXt|jdddS)zm Ensure the directory containing the file exists (create it if necessary) :param filename: file. T)parentsexist_okN)rparentmkdir)rs rensure_directory_existsr!$s,  NNt<<<<<rr!)rrr r )rrr r ) __future__rr rrerrnorrpathlibrrr!__all__r"rr(s"""""" LLLL4====! r"