+
    &j                         ^ RI t ^ RIt^ RIt^ RIt^ RIt ! R R]P
                  4      t ! R R]P                  P                  4      t	R# )    Nc                   |   a a ] tR t^
t oRtRtRV 3R lltRR ltRR ltR t	RR lt
RR ltR tRR	 ltR
tVtV ;t# )JupyterFileSystemz?View of the files as seen by a Jupyter server (notebook or lab)c                  < RV9   d=   Vf     \         P                  ! RV4      ^ ,          pVP	                  R^4      ^ ,          pVP                  R4      R,           V n        \        P                  ! 4       V n	        V'       d   RV 2V P                  P                  R&   \        SV `0  ! R	/ VB  R#   \         d   p\        R4      ThRp?ii ; i)
z

Parameters
----------
url : str
    Base URL of the server, like "http://127.0.0.1:8888". May include
    token in the string, which is given by the process when starting up
tok : str
    If the token is obtained separately, can be given here
kwargs
?Nztoken=([a-z0-9]+)zCould not determine token/z/api/contentsztoken Authorization )refindall
IndexError
ValueErrorsplitrstripurlrequestsSessionsessionheaderssuper__init__)selfr   tokkwargse	__class__s   &&&, v/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/implementations/jupyter.pyr   JupyterFileSystem.__init__   s     #:{I**%8#>qAC ))C#A&C::c?_4'')6<SENDLL  1"6" " I$%@AqHIs   B2 2C=C		Cc                   V P                  V4      pV P                  P                  V P                   R V 24      pVP                  R8X  d   \        V4      hVP                  4        VP                  4       pVR,          R8X  d   VR,          pMV.pV F=  pVP                  R4      VR&   VP                  R4       VR,          R8X  g   K8  RVR&   K?  	  V'       d   V# V Uu. uF  qfR,          NK  	  up# u upi )	r     type	directorycontentpathnamenotebookfile)	_strip_protocolr   getr   status_codeFileNotFoundErrorraise_for_statusjsonpop)r   r#   detailr   routos   &&&,   r   lsJupyterFileSystem.ls)   s    ##D)LLz4&12==C#D))	ffhv;+%i.C%CAfAfIEE)yJ&"&		 
 J#&'3a&		3'''s   $C8c                ~   V P                  V4      pV P                  P                  V P                   R V 24      pVP                  R8X  d   \        V4      hVP                  4        VP                  4       pVR,          R8X  d   VR,          P                  4       pM\        P                  ! VR,          4      pWrV # )r   r   formattextr"   )r'   r   r(   r   r)   r*   r+   r,   encodebase64	b64decode)r   r#   startendr   r/   r0   bs   &&&&,   r   cat_fileJupyterFileSystem.cat_file>   s    ##D)LLz4&12==C#D))	ffhx=F"I%%'A  Y0As|    c                    V P                  V4      pR VP                  R^4      R,          RVR\        V4      R\        P                  ! V4      P                  4       RRRR/pV P                  P                  V P                   RV 2VR	7       R
# )r$   r   r#   sizer"   r5   r8   r    r&   r,   N)	r'   rsplitlenr8   	b64encodedecoder   putr   )r   r#   value_r,   s   &&&, r   	pipe_fileJupyterFileSystem.pipe_fileL   s    ##D)DKKQ'+DCJv''.557hF
 	DHH:Qtf-D9r?   c           
     6   V P                  V4      pV'       d1   R V9   d*   V P                  VP                  R ^4      ^ ,          R4       RVP                  R ^4      R
,          RVRRRRRR/pV P                  P	                  V P
                   R V 2VR	7       R# )r   Tr$   r#   rA   Nr"   r    r!   rB   rC   )r'   mkdirrD   r   rH   r   )r   r#   create_parentsr   r,   s   &&&, r   rN   JupyterFileSystem.mkdirX   s    ##D)cTkJJt{{3*1-t4DKKQ'+DDtK
 	DHH:Qtf-D9r?   c                r    W8X  d   R # V P                   P                  V P                   RV 2RV/R7       R # )Nr   r#   rB   )r   patchr   )r   path1path2	recursivemaxdepthr   s   &&&&&,r   mvJupyterFileSystem.mve   s4    >dhhZq0Gr?   c                |    V P                  V4      pV P                  P                  V P                   R V 24       R# )r   N)r'   r   deleter   )r   r#   s   &&r   _rmJupyterFileSystem._rmj   s3    ##D)txxj$01r?   c                    V P                  V4      pVR 8X  d(   V P                  V4      p\        P                  ! V4      # \	        WRR7      # )rbwb)mode)r'   r=   ioBytesIOSimpleFileWriter)r   r#   r`   r   datas   &&&, r   _openJupyterFileSystem._openn   sC    ##D)4<==&D::d###DT::r?   )r   r   )jupyterjlab)N)T)NN)FN)r^   )__name__
__module____qualname____firstlineno____doc__protocolr   r2   r=   rK   rN   rW   r[   re   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r   
   s;     I"H#4(*
::H
2; ;r?   r   c                   *   a  ] tR t^wt o RR ltRtV tR# )rc   c                    VRJ d   R# V P                   P                  ^ 4       V P                   P                  4       pV P                  P	                  V P
                  V4       R# )zGNever uploads a chunk until file is done

Not suitable for large files
FN)bufferseekreadfsrK   r#   )r   finalrd   s   && r   _upload_chunkSimpleFileWriter._upload_chunkx   sJ    
 E>{{!$))T*r?   r	   N)F)ri   rj   rk   rl   rz   ro   rp   )rr   s   @r   rc   rc   w   s     	+ 	+r?   rc   )
r8   ra   r
   r   fsspecAbstractFileSystemr   specAbstractBufferedFilerc   r	   r?   r   <module>r      s?     	 	  j;11 j;Z
+v{{77 
+r?   