pyarrow.fs.FSSpecHandler#
- class pyarrow.fs.FSSpecHandler(fs)[source]#
Bases:
FileSystemHandlerHandler for fsspec-based Python filesystems.
https://filesystem-spec.readthedocs.io/en/latest/index.html
- 参数:
- fsFSSpec-compliant filesystem
instance
- fsFSSpec-compliant filesystem
示例
>>> PyFileSystem(FSSpecHandler(fsspec_fs))
方法
__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(...).
- delete_dir_contents(self, path, missing_dir_ok=False)[source]#
Implement PyFileSystem.delete_dir_contents(…).
- delete_root_dir_contents(self)[source]#
Implement PyFileSystem.delete_dir_contents(“/”, accept_root_dir=True).
- get_file_info_selector(self, selector)[source]#
Implement PyFileSystem.get_file_info(selector).
- 参数:
- selector
FileSelector 我们想要检索信息的选择器。
- selector
- open_append_stream(self, path, metadata)[source]#
Implement PyFileSystem.open_append_stream(…).
- 参数:
- path
str 要打开的路径。
- metadatamapping
字符串键到字符串值的映射。某些文件系统支持在文件旁存储元数据(例如“Content-Type”)。
- path