
    h                     6    S SK JrJr  S SKJr  S SKJrJr  S rg)    )PureWindowsPathPath)url2pathname)urlparseunquotec                    [        U 5      n[        U5      n[        [        UR                  5      40 UD6n[        UR                  5      R                  (       a%  [        UR                  UR                  -   40 UD6nU$ [        UR                  5      S:  a?  [        UR                  S   5      R                  (       a  [        UR                  SS 0 UD6nU$ )z
Take a file:// url and return a Path.

Adapted from:
    https://github.com/AcademySoftwareFoundation/OpenTimelineIO/blob/4c17494dee2e515aedc8623741556fae3e4afe72/src/py-opentimelineio/opentimelineio/url_utils.py#L43-L72
   N)
r   r   r   r   pathr   netlocdrivelenparts)urlstrkwargsunquotedparsed_resultfilepaths        P/home/james-whalen/.local/lib/python3.13/site-packages/cloudpathlib/url_utils.pypath_from_fileurlr      s     vH X&M L!3!34??H }++,22,,}/A/AALVL O	 
X^^	q	 _X^^A5F%G%M%M+6v6O    N)	pathlibr   r   urllib.requestr   urllib.parser   r   r    r   r   <module>r      s    ) ' *r   