pitrou commented on code in PR #13564:
URL: https://github.com/apache/arrow/pull/13564#discussion_r924325040
##########
python/pyarrow/_fs.pyx:
##########
@@ -460,6 +620,13 @@ cdef class FileSystem(_Weakrefable):
The path of the new directory.
recursive : bool, default True
Create nested directories as well.
+
+ Examples
+ --------
+ >>> local = fs.LocalFileSystem()
+ >>> local.create_dir(local_path + '/new_folder')
+ >>> local.get_file_info(local_path + '/new_folder')
+ <FileInfo for '/.../new_folder': type=FileType.Directory>
Review Comment:
Same here: is it a useful example?
##########
python/pyarrow/_fs.pyx:
##########
@@ -473,6 +640,21 @@ cdef class FileSystem(_Weakrefable):
----------
path : str
The path of the directory to be deleted.
+
+ Examples
+ --------
+ Create directory:
+
+ >>> local = fs.LocalFileSystem()
+ >>> local.create_dir(local_path + '/new_folder')
+ >>> local.get_file_info(local_path + '/new_folder')
+ <FileInfo for '/.../new_folder': type=FileType.Directory>
+
+ Delete the created directory:
+
+ >>> local.delete_dir(local_path + '/new_folder')
+ >>> local.get_file_info(local_path + '/new_folder')
+ <FileInfo for '/.../new_folder': type=FileType.NotFound>
Review Comment:
Same here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]