o
    …wÖi  ã                	   @   sn   d dl mZ d dlmZ zd dlZdZW n eefy#   dZdZY nw dZ	dee
ef fdd	„Zd
d„ ZdS )é    )ÚPath)ÚUnionNTFzmsc://Úpathc                 C   s<   t | tƒrdS | ot| ƒ t¡}tr|S ts|rtdƒ‚dS )zâ
    Check if the path is a multistorageclient URL (e.g. msc://<profile>/<path>).

    Args:
        path: str, the path to check.

    Returns:
        bool, True if the path is a multistorageclient URL, False otherwise.
    FzwMulti-Storage Client is not installed. Please install it with "pip install multi-storage-client" to handle msc:// URLs.)Ú
isinstancer   ÚstrÚ
startswithÚMSC_PROTOCOLÚHAVE_MSCÚ
ValueError)r   Úhas_msc_prefix© r   úQ/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/nemo/utils/msc_utils.pyÚis_multistorageclient_url    s   

ÿr   c                   C   s   t stdƒ‚tS )z-Import multistorageclient if it is installed.zaMulti-Storage Client is not installed. Please install it with "pip install multi-storage-client".)r	   r
   Úmscr   r   r   r   Úimport_multistorageclient;   s
   ÿr   )Úpathlibr   Útypingr   Úmultistorageclientr   r	   ÚImportErrorÚModuleNotFoundErrorr   r   r   r   r   r   r   r   Ú<module>   s   ý