-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
The offending source code is: https://github.com/ziglang/zig/blob/779b8e2/lib/std/fs/File.zig#L373.
Note that I'm not an expert of Windows, however I think that the following issue should be fixed:
Using info.BasicInformation.CreationTime as ctime
In POSIX, ctime represent file metadata change. The equivalent of POSIX ctime is info.BasicInformation.ChangetimeTime, not CreationTime.
See https://devblogs.microsoft.com/oldnewthing/20100709-00/?p=13463 for an unofficial reference.
Supporting only kind of type .file or `.directory
Windows supports symbolic links in info.BasicInformation.FileAttributes and in info.StandardInformation.NumberOfLinks.
Zig should support them, if the semantic is compatible with POSIX.
Add birthtime to std.fs.File.Stat
Since Windows and some POSIX systems like Linux (ext4 and btrfs), BSD (ufs2) and Solaris (zfs) supports birthtime, Zig should add an optional birthtime field to Stat.
Thanks