Adding Windows support to std.file.symlink is mostly done. I just need to get some clarification about some stuff.
For std.file.readLink, druntime is missing a conversion of Fileapi.h, and this is the header that declares the function to retrieve the target's path, GetFinalPathNameByHandle[A|W]. For this issue's resolution, I feel that both readLink and symlink need to be simultaneously added.
Comment #3 by starcanopy — 2020-11-07T01:23:45Z
A potential blocker for this issue's resolution is that Windows (10) necessitates enabling Developer Mode to utilize symlinks. Thus, unless the CIs' Windows hosts may and might be configured to do this, then the Windows' version of `symlink` cannot have a unittest. If that's not acceptable, then this issue should be closed, and the documentation of symlink should inform users of `core.sys.windows.symlink`'s presence. (As of now, the docs merely specify that only POSIX is supported, and I think mentioning that directly utilizing the WinAPI is easy.)
The other pertinent function, `readLink`, is also affected.
Comment #4 by starcanopy — 2020-11-07T01:37:25Z
After more thinking, and thanks to another individual, for the unittests to properly function on all supported versions of Windows, administrative rights must be conferred. (Developer Mode is an exclusive feature of Windows 10.) Whether this is possible or prudent, I do no know.
Comment #5 by robert.schadek — 2024-12-01T16:37:14Z