
    \j                     J    d Z ddlZddlZdZdZej                  Zd Zd Zd Z	y)z0Implements the transport for the file:// schema.    Nfile)z./local/path/filez~/local/path/filezlocal/path/filez./local/path/file.gzzfile:///home/user/filezfile:///home/user/file.bz2c                 :    t        |       }t        t        |      S )N)schemeuri_path)extract_local_pathdictSCHEMEuri_as_string
local_paths     ?/root/env/lib/python3.12/site-packages/smart_open/local_file.py	parse_urir      s    #M2Jv
33    c                 N    t        |       }t        j                  |d   |      }|S )Nr   )r   ioopen)r   modetransport_params
parsed_urifobjs        r   open_urir       s&    =)J77:j)40DKr   c                     | j                  d      r| j                  ddd      }n| }t        j                  j	                  |      S )Nzfile://    )
startswithreplaceospath
expanduserr
   s     r   r   r   &   s>    	*"**9b!<
"
77j))r   )
__doc__r   os.pathr   r	   URI_EXAMPLESr   r   r   r    r   r   <module>r$      s6    7 	 	 
ww4
*r   