/usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__
NameSizeModeActions
arrow.cpython-36.pyc73280644editdlrm
cached.cpython-36.pyc230300644editdlrm
dask.cpython-36.pyc46560644editdlrm
dbfs.cpython-36.pyc133510644editdlrm
dvc.cpython-36.pyc26220644editdlrm
ftp.cpython-36.pyc104440644editdlrm
git.cpython-36.pyc37500644editdlrm
github.cpython-36.pyc74040644editdlrm
hdfs.cpython-36.pyc70930644editdlrm
http.cpython-36.pyc207520644editdlrm
jupyter.cpython-36.pyc41310644editdlrm
libarchive.cpython-36.pyc60050644editdlrm
local.cpython-36.pyc119120644editdlrm
memory.cpython-36.pyc66970644editdlrm
reference.cpython-36.pyc161420644editdlrm
sftp.cpython-36.pyc61040644editdlrm
smb.cpython-36.pyc105910644editdlrm
tar.cpython-36.pyc45020644editdlrm
webhdfs.cpython-36.pyc147120644editdlrm
zip.cpython-36.pyc32760644editdlrm
__init__.cpython-36.pyc1560644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/fsspec/implementations/__pycache__/git.cpython-36.pyc (3750B)
3 8%Eg@s<ddlZddlZddlmZddlmZGdddeZdS)N)AbstractFileSystem) MemoryFilecsleZdZdZdZdZdfdd ZefddZd d Z e d d Z dd dZ dddZ dddZZS) GitFileSystemz\Browse the files of a local git repo at any hash/tag/branch (experimental backend) TNc s4tjf|tj|p |p tj|_|p,d|_dS)aM Parameters ---------- path: str (optional) Local location of the repo (uses current directory if not given). May be deprecated in favour of ``fo``. When used with a higher level function such as fsspec.open(), may be of the form "git://[path-to-repo[:]][ref@]path/to/file" (but the actual file path should not contain "@" or ":"). fo: str (optional) Same as ``path``, but passed as part of a chained URL. This one takes precedence if both are given. ref: str (optional) Reference to work with, could be a hash, tag or branch name. Defaults to current working tree. Note that ``ls`` and ``open`` also take hash, so this becomes the default for those operations kwargs ZmasterN)super__init__pygit2Z Repositoryosgetcwdreporef)selfpathfor kwargs) __class__D/usr/local/lib/python3.6/site-packages/fsspec/implementations/git.pyrszGitFileSystem.__init__csLtj|jd}d|kr*|jddd}d|krB|jddd}|jdS)N/:r@)r_strip_protocollstripsplit)clsr)rrrr+s zGitFileSystem._strip_protocolcCsP|jj|p|j\}}|jd}|j}x$|D]}|r,t|tjr,||}q,W|S)Nr)r Zresolve_refishr rtree isinstancer Tree)rrr Zcommpartsrpartrrr_path_to_object4s   zGitFileSystem._path_to_objectcCsV|jdr|dd}i}d|kr6|jdd\|d<}d|krR|jdd\|d<}|S)Nzgit://rrrrr ) startswithr)routrrr_get_kwargs_from_urls=s  z#GitFileSystem._get_kwargs_from_urlscKs|j|}|j||}t|tjrg}x|D]t}t|tjrn|jddj||jgjd|j d|j ddq,|jddj||jgjd|j d|j |j dq,Wn"|}d|j|j d|j |j dg}|r|Sdd|DS) N directoryrz%or)typenamehexmodesizefilecSsg|] }|dqS)r(r).0orrr osz$GitFileSystem.ls..) rr!rr rappendjoinr(rr)filemoder+)rrZdetailr rrr$objrrrlsHs6       zGitFileSystem.lscCs|j||ddS)N)r r))info)rrr rrrukeyqszGitFileSystem.ukeyrbc Ks|j||p|j}t|jdS)N)data)r!r rr8) rrr* block_sizeZ autocommitZ cache_optionsr rr3rrr_opents zGitFileSystem._open)NNN)TN)N)r7NTNN)__name__ __module__ __qualname____doc__Z root_markerZcachabler classmethodrr! staticmethodr%r4r6r: __classcell__rr)rrr s  ) r)r r Z fsspec.specrZmemoryrrrrrrs