You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2022/07/19 15:48:03 UTC
[arrow] branch master updated: ARROW-17083: [Python] Delete created files and folders in Filesystems docstring examples (#13619)
This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 15d3f3ebe7 ARROW-17083: [Python] Delete created files and folders in Filesystems docstring examples (#13619)
15d3f3ebe7 is described below
commit 15d3f3ebe747b910c3788db91e01f6cfe6473e06
Author: Alenka Frim <Al...@users.noreply.github.com>
AuthorDate: Tue Jul 19 17:47:57 2022 +0200
ARROW-17083: [Python] Delete created files and folders in Filesystems docstring examples (#13619)
This PR is a follow up to https://github.com/apache/arrow/pull/13416 and it deletes the files and directory created with docstring examples.
Authored-by: Alenka Frim <fr...@gmail.com>
Signed-off-by: Antoine Pitrou <an...@python.org>
---
python/pyarrow/_fs.pyx | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/python/pyarrow/_fs.pyx b/python/pyarrow/_fs.pyx
index 5a98593868..bfcff81a5c 100644
--- a/python/pyarrow/_fs.pyx
+++ b/python/pyarrow/_fs.pyx
@@ -882,6 +882,9 @@ cdef class LocalFileSystem(FileSystem):
<FileInfo for '/tmp/new_folder/local_fs-copy.dat': type=FileType.File, size=16>
>>> local.get_file_info('/tmp/local_fs-copy.dat')
<FileInfo for '/tmp/local_fs-copy.dat': type=FileType.NotFound>
+
+ To finish delete the file left:
+ >>> local.delete_file('/tmp/local_fs.dat')
"""
def __init__(self, *, use_mmap=False):
@@ -966,6 +969,11 @@ cdef class SubTreeFileSystem(FileSystem):
>>> subtree.get_file_info('sub_tree_fs.dat')
<FileInfo for 'sub_tree_fs.dat': type=FileType.File, size=12>
+ Delete the file and directory:
+
+ >>> local.delete_dir('/tmp/sub_tree')
+ >>> local.delete_file('/tmp/local_fs.dat')
+
For usage of the methods see examples for :func:`~pyarrow.fs.LocalFileSystem`.
"""