AlenkaF commented on code in PR #13564:
URL: https://github.com/apache/arrow/pull/13564#discussion_r918666949
##########
python/pyarrow/_fs.pyx:
##########
@@ -260,6 +354,44 @@ cdef class FileSelector(_Weakrefable):
If true, an empty selection is returned.
recursive : bool, default False
Whether to recurse into subdirectories.
+
+ Examples
+ --------
+ Generate a file:
+
+ >>> from pyarrow import fs
+ >>> local = fs.LocalFileSystem()
+ >>> with local.open_output_stream('/tmp/fileinfo.dat') as stream:
+ ... stream.write(b'data')
+ ...
+ 4
+
+ Create new directory and subdirectory with copied data:
+
+ >>> # directory
+ >>> local.create_dir('/tmp/alphabet')
+ >>> local.copy_file('/tmp/fileinfo.dat', '/tmp/alphabet/fileinfo.dat')
+ >>> # subdirectory
+ >>> local.create_dir('/tmp/alphabet/aeiou')
Review Comment:
It is a good vocal practice :P
Sure, will change.
--
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]