
    OOId&                     N   d dl Z d dlZd dlZg dZi Z ej        e          ZdZdkdZi dddiddd	id
ddddddddddddddidddiddddddddddddddddd dddd!dd"id#d$d%dd&d$d%dd'd(d)dd*d+d,di d-d+d,dd.d/d0dd1d2d3dd4d5d6dd7d8d9dd:d;d<dd=d;d<dd>dd?id@dd?idAddBidCddDidEdFdGddHdIdJddKdLdMddNdOdPddQdRdSddTdUdVddUdVddWdXdddYiddZid[d\dd]d^dd_d`ddadbddcdddddeidf
Z	dg Z
dldhZdi Zdj ZdS )m    N)registryget_filesystem_classdefaultfileFc                     t          |t                    r5| t          v r|du rt          d| z            ||p|d| dt          | <   dS | t          v r|du rt          d| z            |t
          | <   dS )a  Add implementation class to the registry

    Parameters
    ----------
    name: str
        Protocol name to associate with the class
    cls: class or str
        if a class: fsspec-compliant implementation class (normally inherits from
        ``fsspec.AbstractFileSystem``, gets added straight to the registry. If a
        str, the full path to an implementation class like package.module.class,
        which gets added to known_implementations,
        so the import is deferred until the filesystem is actually used.
    clobber: bool (optional)
        Whether to overwrite a protocol with the same name; if False, will raise
        instead.
    errtxt: str (optional)
        If given, then a failure to import the given class will result in this
        text being given.
    FzCName (%s) already in the known_implementations and clobber is Falsez import failed for protocol classerrz6Name (%s) already in the registry and clobber is FalseN)
isinstancestrknown_implementations
ValueErrorr   	_registry)nameclsclobbererrtxts       /lib/python3.11/site-packages/fsspec/registry.pyregister_implementationr      s    ( #s (((W-=-=!"  
 M333M'
 '
d### 85 0 0H4O   	$    r	   z,fsspec.implementations.local.LocalFileSystemmemoryz.fsspec.implementations.memory.MemoryFileSystemdropboxz%dropboxdrivefs.DropboxDriveFileSystemzTDropboxFileSystem requires "dropboxdrivefs","requests" and "dropbox" to be installedr   httpz*fsspec.implementations.http.HTTPFileSystemz@HTTPFileSystem requires "requests" and "aiohttp" to be installedhttpszipz(fsspec.implementations.zip.ZipFileSystemtarz(fsspec.implementations.tar.TarFileSystemgcszgcsfs.GCSFileSystemz-Please install gcsfs to access Google Storagegsgdrivezgdrivefs.GoogleDriveFileSystemz2Please install gdrivefs for access to Google Drivesftpz*fsspec.implementations.sftp.SFTPFileSystemz2SFTPFileSystem requires "paramiko" to be installedsshftpz(fsspec.implementations.ftp.FTPFileSystemhdfsz-fsspec.implementations.arrow.HadoopFileSystemz2pyarrow and local java libraries required for HDFS
arrow_hdfswebhdfsz&fsspec.implementations.webhdfs.WebHDFSz2webHDFS access requires "requests" to be installeds3zs3fs.S3FileSystemzInstall s3fs to access S3s3awandbzwandbfs.WandbFSzInstall wandbfs to access wandbocizocifs.OCIFileSystemz*Install ocifs to access OCI Object Storage
asynclocalz&morefs.asyn_local.AsyncLocalFileSystemz:Install 'morefs[asynclocalfs]' to use AsyncLocalFileSystemadlzadlfs.AzureDatalakeFileSystemz+Install adlfs to access Azure Datalake Gen1abfszadlfs.AzureBlobFileSystemzBInstall adlfs to access Azure Datalake Gen2 and Azure Blob Storageazcachedz/fsspec.implementations.cached.CachingFileSystem
blockcache	filecachez6fsspec.implementations.cached.WholeFileCacheFileSystemsimplecachez3fsspec.implementations.cached.SimpleCacheFileSystemdaskz0fsspec.implementations.dask.DaskWorkerFileSystemz5Install dask distributed to access worker file systemdbfsz0fsspec.implementations.dbfs.DatabricksFileSystemz<Install the requests package to use the DatabricksFileSystemgithubz.fsspec.implementations.github.GithubFileSystemz1Install the requests package to use the github FSgitz(fsspec.implementations.git.GitFileSystemz(Install pygit2 to browse local git repossmbz(fsspec.implementations.smb.SMBFileSystemz?SMB requires "smbprotocol" or "smbprotocol[kerberos]" installedjupyterz0fsspec.implementations.jupyter.JupyterFileSystemz,Jupyter FS requires requests to be installedz6fsspec.implementations.libarchive.LibArchiveFileSystemz#LibArchive requires to be installedz4fsspec.implementations.reference.ReferenceFileSystemz fsspec.generic.GenericFileSystemzossfs.OSSFileSystemz5Install ossfs to access Alibaba Object Storage Systemzwebdav4.fsspec.WebdavFileSystemz Install webdav4 to access WebDAVzdvc.api.DVCFileSystemz#Install dvc to access DVCFileSystemzhuggingface_hub.HfFileSystemz.Install huggingface_hub to access HfFileSystemzfsspec_xrootd.XRootDFileSystemzInstall fsspec-xrootd to access xrootd storage system. Note: 'root' is the protocol name for xrootd storage systems, not referring to root directoriesz*fsspec.implementations.dirfs.DirFileSystem)
jlab
libarchive	referencegenericosswebdavdvchfrootdirc                 b   | st           } | t          vru| t          vrt          d| z            t          |          }	 t	          | t          |d                              n(# t          $ r}t          |d                   |d}~ww xY wt          |          }t          |dd          dv r| |_        |S )aK  Fetch named protocol implementation from the registry

    The dict ``known_implementations`` maps protocol names to the locations
    of classes implementing the corresponding file-system. When used for the
    first time, appropriate imports will happen and the class will be placed in
    the registry. All subsequent calls will fetch directly from the registry.

    Some protocol implementations require additional dependencies, and so the
    import may fail. In this case, the string in the "err" field of the
    ``known_implementations`` will be given as the error message.
    zProtocol not known: %sr	   r
   Nprotocol)abstractN)	r   r   r   r   r   _import_classImportErrorgetattrrC   )rC   biter   s       r   r   r      s      x0005@AAA#H-	1#HmCL.I.IJJJJ 	1 	1 	1c%j))q0	1
8
CsJ%%);;;Js   #A   
B*B  Bc                 2   d| v rW|                      dd          \  }}t          j        |          }|                    d          D ]}t	          ||          }|S |                      dd          \  }}t          j        |          }t	          ||          S )zTake a string FQP and return the imported class or identifier

    clas is of the form "package.module.klass" or "package.module:subobject.klass"
    :   .)rsplit	importlibimport_modulesplitrG   )r   minvmodr   parts        r   rE   rE      s    
 czzJJsA&&	T%c**JJsOO 	% 	%D#t$$CC
JJsA&&	T%c**sD!!!r   c                 p    | dk    rt          j        dt                     t          |           } |di |S )zInstantiate filesystems for given protocol and arguments

    ``storage_options`` are specific to the protocol being chosen, and are
    passed directly to the class.
    r$   zfThe 'arrow_hdfs' protocol has been deprecated and will be removed in the future. Specify it as 'hdfs'. )warningswarnDeprecationWarningr   )rC   storage_optionsr   s      r   
filesystemr[      sP     <;	
 	
 	
 x
(
(C3!!!!!r   c                  *    t          t                    S )zReturn a list of the implemented protocols.

    Note that any given protocol may require extra packages to be importable.
    )listr   rV   r   r   available_protocolsr^     s    
 %&&&r   )FN)N)rO   typesrW   __all__r   MappingProxyTyper   r   r   r   r   rE   r[   r^   rV   r   r   <module>rb      s        
9
9
9 	 "5!),,
$ $ $ $RI
WDEIwHII 87 I =Q I =Q I$ 
G?@%I& 
G?@'I( 
&> )I0 	&> 1I8 1C 9I@ =C AIH 
=C IIP 
G?@QIR @C SIZ @C [Ib 9C cIj 	'0K
L
LkI Il 
(1LMMmIn (1RSSoIp 
&; qIx 9K yI@ 
0< AIH ,S IIP 	,S QIX wIJYIZ 7MN[I\ 'ST]I^ GRS_I` CF aIh CM iIp AB qIx 
;9 yI@ 
;P AIH C= II IR D= 
 J4  QR;<&F 
 31 
 )4 
 0? 
 2/  ABQI I I X  <" " " """ " ""' ' ' ' 'r   