pyarrow.fs.FSSpecHandler — Apache Arrow v20.0.0 (original) (raw)
class pyarrow.fs.FSSpecHandler(fs)[source]#
Bases: FileSystemHandler
Handler for fsspec-based Python filesystems.
https://filesystem-spec.readthedocs.io/en/latest/index.html
Parameters:
fsFSSpec-compliant filesystem instance
Examples
PyFileSystem(FSSpecHandler(fsspec_fs))
Methods
copy_file(self, src, dest)[source]#
Implement PyFileSystem.copy_file(…).
Parameters:
srcstr
path of what should be copied.
deststr
path of where it should be copied to.
create_dir(self, path, recursive)[source]#
Implement PyFileSystem.create_dir(…).
Parameters:
pathstr
path of the directory.
recursivebool
if the parent directories should be created too.
delete_dir(self, path)[source]#
Implement PyFileSystem.delete_dir(…).
Parameters:
pathstr
path of the directory.
delete_dir_contents(self, path, missing_dir_ok=False)[source]#
Implement PyFileSystem.delete_dir_contents(…).
Parameters:
pathstr
path of the directory.
missing_dir_okbool
if False an error should be raised if path does not exist
delete_file(self, path)[source]#
Implement PyFileSystem.delete_file(…).
Parameters:
pathstr
path of the file.
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).
Parameters:
paths for which we want to retrieve the info.
get_file_info_selector(self, selector)[source]#
Implement PyFileSystem.get_file_info(selector).
Parameters:
selectorFileSelector
selector for which we want to retrieve the info.
Implement PyFileSystem.type_name.
move(self, src, dest)[source]#
Implement PyFileSystem.move(…).
Parameters:
srcstr
path of what should be moved.
deststr
path of where it should be moved to.
normalize_path(self, path)[source]#
Implement PyFileSystem.normalize_path(…).
Parameters:
pathstr
path of what should be normalized.
open_append_stream(self, path, metadata)[source]#
Implement PyFileSystem.open_append_stream(…).
Parameters:
pathstr
path of what should be opened.
metadatamapping
Mapping of string keys to string values. Some filesystems support storing metadata along the file (such as “Content-Type”).
open_input_file(self, path)[source]#
Implement PyFileSystem.open_input_file(…).
Parameters:
pathstr
path of what should be opened.
open_input_stream(self, path)[source]#
Implement PyFileSystem.open_input_stream(…).
Parameters:
pathstr
path of what should be opened.
open_output_stream(self, path, metadata)[source]#
Implement PyFileSystem.open_output_stream(…).
Parameters:
pathstr
path of what should be opened.
metadatamapping
Mapping of string keys to string values. Some filesystems support storing metadata along the file (such as “Content-Type”).