Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion fsspec/implementations/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,19 @@ def info(self, path, **kwargs):
t = "file"
else:
t = "other"

# Check for the 'st_birthtime' attribute, which is not always present.
if hasattr(out, 'st_birthtime'):
created_time = out.st_birthtime
else:
# Fallback to 'st_ctime' for systems without birth time support.
created_time = out.st_ctime

result = {
"name": path,
"size": size,
"type": t,
"created": out.st_ctime,
"created": created_time,
"islink": link,
}
for field in ["mode", "uid", "gid", "mtime", "ino", "nlink"]:
Expand Down