MCPcopy Create free account
hub / github.com/apache/arrow / _create_file_info

Method _create_file_info

python/pyarrow/fs.py:303–313  ·  view source on GitHub ↗
(path, info)

Source from the content-addressed store, hash-verified

301
302 @staticmethod
303 def _create_file_info(path, info):
304 size = info["size"]
305 if info["type"] == "file":
306 ftype = FileType.File
307 elif info["type"] == "directory":
308 ftype = FileType.Directory
309 # some fsspec filesystems include a file size for directories
310 size = None
311 else:
312 ftype = FileType.Unknown
313 return FileInfo(path, ftype, size=size, mtime=info.get("mtime", None))
314
315 def get_file_info(self, paths):
316 infos = []

Callers 2

get_file_infoMethod · 0.95

Calls 2

FileInfoClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected