Ë
    ¸­ h÷
  ã                  ó�   — d dl mZ d dlZd dlmZ d dlmZ dd„Zdd„Z	dd„Z
dd„Zdd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zy)é    )ÚannotationsN)Úget_path)ÚPathInc                óL   — t        | «      } t        | «      st        d| › �«      ‚y)zT
    Raise an OSError if the given path doesn't exist or it is not a directory.
    zInvalid directory path: N©Ú	_get_pathÚis_dirÚOSError©Úpaths    úK/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fsutil/checks.pyÚ
assert_dirr   	   s,   € ô �T‹?€DÜ�$Œ<ÜÐ0°°Ð7Ó8Ð8ð ó    c                óL   — t        | «      } t        | «      st        d| › �«      ‚y)z;
    Raise an OSError if the given path doesn't exist.
    zInvalid item path: N©r   Úexistsr
   r   s    r   Úassert_existsr      s,   € ô �T‹?€DÜ�$Œ<ÜÐ+¨D¨6Ð2Ó3Ð3ð r   c                óL   — t        | «      } t        | «      st        d| › �«      ‚y)zO
    Raise an OSError if the given path doesn't exist or it is not a file.
    zInvalid file path: N©r   Úis_filer
   r   s    r   Úassert_filer      s,   € ô �T‹?€DÜ�4Œ=ÜÐ+¨D¨6Ð2Ó3Ð3ð r   c                óL   — t        | «      } t        | «      rt        d| › �«      ‚y)zF
    Raise an OSError if the given path is an existing directory.
    z(Invalid path, directory already exists: Nr   r   s    r   Úassert_not_dirr   $   s,   € ô �T‹?€DÜˆd„|ÜÐ@ÀÀÐGÓHÐHð r   c                óL   — t        | «      } t        | «      rt        d| › �«      ‚y)z<
    Raise an OSError if the given path already exists.
    z#Invalid path, item already exists: Nr   r   s    r   Úassert_not_existsr   -   s,   € ô �T‹?€DÜˆd„|ÜÐ;¸D¸6ÐBÓCÐCð r   c                óL   — t        | «      } t        | «      rt        d| › �«      ‚y)zA
    Raise an OSError if the given path is an existing file.
    z#Invalid path, file already exists: Nr   r   s    r   Úassert_not_filer   6   s,   € ô �T‹?€DÜˆt„}ÜÐ;¸D¸6ÐBÓCÐCð r   c                óV   — t        | «      } t        j                  j                  | «      S )zB
    Check if a directory of a file exists at the given path.
    )r   Úosr   r   r   s    r   r   r   ?   ó    € ô �T‹?€DÜ�7‰7�>‰>˜$ÓÐr   c                óV   — t        | «      } t        j                  j                  | «      S )zP
    Determine whether the specified path represents an existing directory.
    )r   r   r   Úisdirr   s    r   r	   r	   G   s    € ô �T‹?€DÜ�7‰7�=‰=˜ÓÐr   c                óp   — t        | «      } t        | «       t        | «      rt        | «      S t	        | «      S )z^
    Determine whether the specified path represents an empty directory or an empty file.
    )r   r   r	   Úis_empty_dirÚis_empty_filer   s    r   Úis_emptyr&   O   s2   € ô �T‹?€DÜ�$ÔÜˆd„|Ü˜DÓ!Ð!Ü˜ÓÐr   c                óp   — t        | «      } t        | «       t        t        j                  | «      «      dk(  S )zM
    Determine whether the specified path represents an empty directory.
    r   )r   r   Úlenr   Úlistdirr   s    r   r$   r$   Z   s.   € ô �T‹?€DÜˆtÔÜŒr�z‰z˜$ÓÓ  AÑ%Ð%r   c                ó:   — ddl m} t        | «      }  || «      dk(  S )zH
    Determine whether the specified path represents an empty file.
    r   )Úget_file_size)Úfsutil.infor+   r   )r   r+   s     r   r%   r%   c   s    € õ *ä�T‹?€DÙ˜Ó !Ñ#Ð#r   c                óV   — t        | «      } t        j                  j                  | «      S )zK
    Determine whether the specified path represents an existing file.
    )r   r   r   Úisfiler   s    r   r   r   m   r    r   )r   r   ÚreturnÚNone)r   r   r/   Úbool)Ú
__future__r   r   Úfsutil.argsr   r   Úfsutil.typesr   r   r   r   r   r   r   r   r	   r&   r$   r%   r   © r   r   ú<module>r6      sP   ðÝ "ã 	å -Ý ó9ó4ó4óIóDóDó óóó&ó$ô r   