
    bi                     &   U d dl Z d dlZd dlZd dlmZ d dlZd dlZd dlmZ ddl	m
Z
 e
j                  e
j                  e
j                  e
j                  e
j                  gZee
j$                     ed<   eD ]t  Zej*                  ej,                  v r;ej,                  ej*                     eur  ej.                  dej*                   d        ej0                  ej*                  ed	
       v dej2                  defdZdej2                  dedefdZy)    N)List)LocalFileSystem   )compressionCOMPRESSION_FILESYSTEMSz*A filesystem protocol was already set for z and will be overwritten.T)clobberfsreturnc                 $    t        | t               S )z
    Checks if `fs` is a remote filesystem.

    Args:
        fs (`fsspec.spec.AbstractFileSystem`):
            An abstract super-class for pythonic file-systems, e.g. `fsspec.filesystem('file')` or `s3fs.S3FileSystem`.
    )
isinstancer   )r	   s    X/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/datasets/filesystems/__init__.pyis_remote_filesystemr      s     "o...    srcdstc                     t        |       s5t        j                  | j                  |      | j                  |             y| j	                  ||d       y)z2
    Renames the file `src` in `fs` to `dst`.
    T)	recursiveN)r   shutilmove_strip_protocolmv)r	   r   r   s      r   renamer   '   sB      #B&&s+R-?-?-DE
c3$'r   )	importlibr   warningstypingr   fsspecfsspec.asynfsspec.implementations.localr    r   Bz2FileSystemGzipFileSystemLz4FileSystemXzFileSystemZstdFileSystemr   listBaseCompressedFileFileSystem__annotations__fs_classprotocolregistrywarnregister_implementationAbstractFileSystemboolr   strr    r   r   <module>r1      s         8  K kFFG  ( NHFOO+@Q@Q0RZb0bB8CTCTBUUnop"F""8#4#4hMN/V66 /4 /(v(( (s ( (r   