diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2023-12-19 23:01:57 -0800 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2023-12-19 23:36:23 -0800 |
| commit | 11a398af3e12f0d1da0a5f95a17e334a063890a9 (patch) | |
| tree | 5b8be54db331c73e8a3fafd7e3f959d42d68418a /lib/std/json | |
| parent | f36ac227b13884f42f259bc38c5b0aa012273799 (diff) | |
| download | zig-11a398af3e12f0d1da0a5f95a17e334a063890a9.tar.gz zig-11a398af3e12f0d1da0a5f95a17e334a063890a9.zip | |
File.stat: Support detection of Kind.sym_link on Windows
Requires an extra NtQueryInformationFile call when FILE_ATTRIBUTE_REPARSE_POINT is set to determine if it's actually a symlink or some other kind of reparse point (https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags). This is something that `File.Metadata.kind` was already doing, so the same technique is used in `stat`.
Also, replace the std.os.windows.DeviceIoControl call in `metadata` with NtQueryInformationFile (NtQueryInformationFile is what gets called during kernel32.GetFileInformationByHandleEx with FileAttributeTagInfo, verified using NtTrace).
Diffstat (limited to 'lib/std/json')
0 files changed, 0 insertions, 0 deletions
