AlenkaF commented on code in PR #13564:
URL: https://github.com/apache/arrow/pull/13564#discussion_r918663448


##########
python/pyarrow/_fs.pyx:
##########
@@ -100,6 +100,53 @@ cdef class FileInfo(_Weakrefable):
         If given, the filesystem entry size in bytes.  This should only
         be given if `type` is `FileType.File`.
 
+    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
+
+    Get FileInfo object using `get_file_info()`:
+
+    >>> local.get_file_info('/tmp/fileinfo.dat')
+    <FileInfo for '/tmp/fileinfo.dat': type=FileType.File, size=4>
+
+    or FileInfo constructor:
+
+    >>> fs.FileInfo('/tmp/fileinfo.dat', type=fs.FileType.File)
+    <FileInfo for '/tmp/fileinfo.dat': type=FileType.File, size=None>

Review Comment:
   Not sure either =) Will remove it.



-- 
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]

Reply via email to