jorisvandenbossche commented on a change in pull request #7395:
URL: https://github.com/apache/arrow/pull/7395#discussion_r438136127



##########
File path: python/pyarrow/tests/test_fs.py
##########
@@ -511,7 +545,8 @@ def test_get_file_info(fs, pathfn):
     assert 'aaa' in repr(aaa_info)
     assert aaa_info.extension == ''
     assert 'FileType.Directory' in repr(aaa_info)
-    assert aaa_info.size is None
+    # TODO fsspec gives a size for directories

Review comment:
       For the local filesystem, it's the number that comes from `os.stat`, but 
not directly sure what the number means (it seems to vary from dir to dir):
   
   ```
   In [12]: localfs = fsspec.filesystem("file")
   
   In [13]: localfs.info("/home/joris")  
   Out[13]: 
   {'name': '/home/joris',
    'size': 4096,
    'type': 'directory',
    'created': 1591701720.911709,
    'mode': 16877,
    'uid': 1001,
    'gid': 1001,
    'mtime': 1591701720.911709}
   
   In [19]: os.stat("/home/joris/") 
   Out[19]: os.stat_result(st_mode=16877, st_ino=2490370, st_dev=66307, 
st_nlink=53, st_uid=1001, st_gid=1001, st_size=4096, st_atime=1591618981, 
st_mtime=1591701720, st_ctime=1591701720)
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to