pyarrow.fs.FSSpecHandler#

class pyarrow.fs.FSSpecHandler(fs)[source]#

Bases: FileSystemHandler

Handler for fsspec-based Python filesystems.

https://filesystem-spec.readthedocs.io/en/latest/index.html

参数:
fsFSSpec-compliant filesystem instance

示例

>>> PyFileSystem(FSSpecHandler(fsspec_fs))
__init__(fs)[source]#

方法

__init__(fs)

copy_file(self, src, dest)

Implement PyFileSystem.copy_file(...).

create_dir(self, path, recursive)

Implement PyFileSystem.create_dir(...).

delete_dir(self, path)

Implement PyFileSystem.delete_dir(...).

delete_dir_contents(self, path[, missing_dir_ok])

Implement PyFileSystem.delete_dir_contents(...).

delete_file(self, path)

Implement PyFileSystem.delete_file(...).

delete_root_dir_contents(self)

Implement PyFileSystem.delete_dir_contents("/", accept_root_dir=True).

get_file_info(self, paths)

Implement PyFileSystem.get_file_info(paths).

get_file_info_selector(self, selector)

Implement PyFileSystem.get_file_info(selector).

get_type_name(self)

Implement PyFileSystem.type_name.

move(self, src, dest)

Implement PyFileSystem.move(...).

normalize_path(self, path)

Implement PyFileSystem.normalize_path(...).

open_append_stream(self, path, metadata)

Implement PyFileSystem.open_append_stream(...).

open_input_file(self, path)

Implement PyFileSystem.open_input_file(...).

open_input_stream(self, path)

Implement PyFileSystem.open_input_stream(...).

open_output_stream(self, path, metadata)

Implement PyFileSystem.open_output_stream(...).

copy_file(self, src, dest)[source]#

Implement PyFileSystem.copy_file(…).

参数:
srcstr

要复制的路径。

deststr

复制到的路径。

create_dir(self, path, recursive)[source]#

Implement PyFileSystem.create_dir(…).

参数:
pathstr

目录的路径。

recursivebool

是否也应创建父目录。

delete_dir(self, path)[source]#

Implement PyFileSystem.delete_dir(…).

参数:
pathstr

目录的路径。

delete_dir_contents(self, path, missing_dir_ok=False)[source]#

Implement PyFileSystem.delete_dir_contents(…).

参数:
pathstr

目录的路径。

missing_dir_okbool

如果为 False,则如果路径不存在,将引发错误。

delete_file(self, path)[source]#

Implement PyFileSystem.delete_file(…).

参数:
pathstr

文件的路径。

delete_root_dir_contents(self)[source]#

Implement PyFileSystem.delete_dir_contents(“/”, accept_root_dir=True).

get_file_info(self, paths)[source]#

Implement PyFileSystem.get_file_info(paths).

参数:
pathslist of str

我们想要检索信息的路径。

get_file_info_selector(self, selector)[source]#

Implement PyFileSystem.get_file_info(selector).

参数:
selectorFileSelector

我们想要检索信息的选择器。

get_type_name(self)[source]#

Implement PyFileSystem.type_name.

move(self, src, dest)[source]#

Implement PyFileSystem.move(…).

参数:
srcstr

要移动的路径。

deststr

移动到的路径。

normalize_path(self, path)[source]#

Implement PyFileSystem.normalize_path(…).

参数:
pathstr

要规范化的路径。

open_append_stream(self, path, metadata)[source]#

Implement PyFileSystem.open_append_stream(…).

参数:
pathstr

要打开的路径。

metadatamapping

字符串键到字符串值的映射。某些文件系统支持在文件旁存储元数据(例如“Content-Type”)。

open_input_file(self, path)[source]#

Implement PyFileSystem.open_input_file(…).

参数:
pathstr

要打开的路径。

open_input_stream(self, path)[source]#

Implement PyFileSystem.open_input_stream(…).

参数:
pathstr

要打开的路径。

open_output_stream(self, path, metadata)[source]#

Implement PyFileSystem.open_output_stream(…).

参数:
pathstr

要打开的路径。

metadatamapping

字符串键到字符串值的映射。某些文件系统支持在文件旁存储元数据(例如“Content-Type”)。