pitrou commented on code in PR #13564: URL: https://github.com/apache/arrow/pull/13564#discussion_r924326108
########## python/pyarrow/_fs.pyx: ########## @@ -496,6 +678,24 @@ cdef class FileSystem(_Weakrefable): missing_dir_ok : boolean, default False If False then an error is raised if path does not exist + + Examples + -------- + Create a directory and copy a file into it: + + >>> local.create_dir(local_path + '/new_dir') + >>> local.copy_file(path, + ... local_path + '/new_dir/example_copy.dat') + >>> local.get_file_info(local_path + '/new_dir/example_copy.dat') + <FileInfo for '/.../new_dir/example_copy.dat': type=FileType.File, size=4> + + Delete only the content of the directory and not the directory itself: + + >>> local.delete_dir_contents(local_path + '/new_dir') + >>> local.get_file_info(local_path + '/new_dir/example_copy.dat') + <FileInfo for '/.../new_dir/example_copy.dat': type=FileType.NotFound> + >>> local.get_file_info(local_path + '/new_dir') + <FileInfo for '/.../new_dir': type=FileType.Directory> Review Comment: The fact that the example is much longer and more complex than the method description makes it not very useful IMHO. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org