/usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/pyarrow/__pycache__/filesystem.cpython-36.pyc (14402B)
3
9%Eg8 @ s d dl Z d dlZd dlZd dlZd dlZd dlmZ d dl Z
d dlmZm
Z
mZmZ ejdddZG dd dZG d d
d
eZG dd deZG d
d deZdd Zdd ZdddZdS ) N)join)
implements_stringify_path
_is_path_like _DEPR_MSGzfilesystem.LocalFileSystemz2.0.0zfs.LocalFileSystemc @ s e Zd ZdZdd Zdd Zd(ddZd d
Zdd Zd
d Z d)ddZ
dd Zdd Zd*ddZ
dd Zdd Zdd Zdd Zd+d!d"Zd,d$d%Zed&d' Zd S )-
FileSystemz(
Abstract filesystem interface.
c C s | j |d
}|j S Q R X dS )z
Return contents of file as a bytes object.
Parameters
----------
path : str
File path to read content from.
Returns
-------
contents : bytes
rbN)openread)selfpathf r >/usr/local/lib64/python3.6/site-packages/pyarrow/filesystem.pycat) s
zFileSystem.catc C s t dS )z
Return list of file paths.
Parameters
----------
path : str
Directory to list contents from.
N)NotImplementedError)r r r r r ls9 s z
FileSystem.lsFc C s t dS )z
Delete the indicated file or directory.
Parameters
----------
path : str
Path to delete.
recursive : bool, default False
If True, also delete child paths for directories.
N)r )r r recursiver r r deleteD s zFileSystem.deletec C st t |}| j|}|d dkr&|d S d}xD| j|D ]6\}}}x*|D ]"}| j||}|| j|d 7 }qFW q6W |S )z
Compute bytes used by all contents under indicated path in file tree.
Parameters
----------
path : str
Can be a file path or directory.
Returns
-------
usage : int
kindfilesizer )r statwalk
_path_join) r r Z path_infototalrootdirectoriesfilesZ
child_pathabspathr r r
disk_usageQ s
zFileSystem.disk_usagec G s | j j|S )N)pathsepr )r argsr r r r k s zFileSystem._path_joinc C s t ddS )zl
Information about a filesystem entry.
Returns
-------
stat : dict
zFileSystem.statN)r )r r r r r r n s zFileSystem.statc C s | j ||dS )z.
Alias for FileSystem.delete.
)r )r )r r r r r r rmx s z
FileSystem.rmc C s | j ||S )z.
Alias for FileSystem.rename.
)rename)r r new_pathr r r mv~ s z
FileSystem.mvc C s t ddS )z
Rename file, like UNIX mv command.
Parameters
----------
path : str
Path to alter.
new_path : str
Path to move to.
zFileSystem.renameN)r )r r r% r r r r$ s zFileSystem.renameTc C s t dS )z
Create a directory.
Parameters
----------
path : str
Path to the directory.
create_parents : bool, default True
If the parent directories don't exists create them as well.
N)r )r r create_parentsr r r mkdir s zFileSystem.mkdirc C s t dS )z
Return True if path exists.
Parameters
----------
path : str
Path to check.
N)r )r r r r r exists s zFileSystem.existsc C s t dS )z
Return True if path is a directory.
Parameters
----------
path : str
Path to check.
N)r )r r r r r isdir s zFileSystem.isdirc C s t dS )z
Return True if path is a file.
Parameters
----------
path : str
Path to check.
N)r )r r r r r isfile s zFileSystem.isfilec C s t dS )zf
Returns True if this FileSystem is a unix-style file store with
directories.
N)r )r r r r _isfilestore s zFileSystem._isfilestoreNc C s, ddl m} ||||| d}|j|||dS )a]
Read Parquet data from path in file system. Can read from a single file
or a directory of files.
Parameters
----------
path : str
Single file path or directory
columns : List[str], optional
Subset of columns to read.
metadata : pyarrow.parquet.FileMetaData
Known metadata to validate files against.
schema : pyarrow.parquet.Schema
Known schema to validate files against. Alternative to metadata
argument.
use_threads : bool, default True
Perform multi-threaded column reads.
use_pandas_metadata : bool, default False
If True and file has custom pandas schema metadata, ensure that
index columns are also loaded.
Returns
-------
table : pyarrow.Table
r )ParquetDataset)schemametadata
filesystem)columnsuse_threadsuse_pandas_metadata)Zpyarrow.parquetr- r
) r r r1 r/ r. r2 r3 r- Zdatasetr r r read_parquet s
zFileSystem.read_parquetr c C s t dS )z3
Open file for reading or writing.
N)r )r r moder r r r s zFileSystem.openc C s dS )N/r )r r r r r! s zFileSystem.pathsep)F)F)T)NNNTF)r )__name__
__module____qualname____doc__r r r r r r r# r&