pitrou commented on code in PR #13582: URL: https://github.com/apache/arrow/pull/13582#discussion_r920233875
########## python/pyarrow/fs.py: ########## @@ -227,16 +227,28 @@ def copy_files(source, destination, Examples -------- - Copy an S3 bucket's files to a local directory: + Inspect an S3 bucket's files: - >>> copy_files("s3://your-bucket-name", - ... "local-directory") # doctest: +SKIP + >>> s3, path = fs.FileSystem.from_uri( + ... "s3://registry.opendata.aws/roda/ndjson/") + >>> selector = fs.FileSelector(path) + >>> s3.get_file_info(selector) + [<FileInfo for 'registry.opendata.aws/roda/ndjson/index.ndjson':...] - Using a FileSystem object: + Copy one file from S3 bucket to a local directory: - >>> copy_files("your-bucket-name", "local-directory", - ... source_filesystem=S3FileSystem(...)) # doctest: +SKIP + >>> fs.copy_files("s3://registry.opendata.aws/roda/ndjson/index.ndjson", + ... "file:///{}/index_copy.ndjson".format(local_path)) + >>> selector2 = fs.FileSelector(str(local_path)) + >>> local.get_file_info(selector2) Review Comment: The reader doesn't know what `local` is, so is this the best way of presenting this example? Perhaps instantiate the filesystem explicitly? Also, I think you can pass `local_path` directly instead of a selector. ```suggestion >>> fs.LocalFileSystem().get_file_info(local_path) ``` -- 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