6 Commits

Author SHA1 Message Date
Saleem Abdulrasool
aabac27b21
FoundationEssentials: implement file operations (#566)
This adds an initial implementation for file operations on Windows. With
this, `FileManager` should at least build on Windows, which unblocks
future work as well as brings us closer to enabling
`FoundationEssentials` on Windows.
2024-04-29 15:34:46 -07:00
Saleem Abdulrasool
c5e734c89a
FoundationEssentials: enable unprivilleged symlinks if possible (#556)
If developer mode is enabled or the user is assigned the
SeCreateSymbolicLinkPrivilege privilege, permit the unelevated symbolic
link creation.
2024-04-26 10:11:51 -07:00
Saleem Abdulrasool
d80478289c
(127077121) FoundationEssentials: support directory enumeration operations on Windows (#554)
Implement the directory enumeration operations in FileManager on
Windows. The implementation uses the Win32 API surface to ensure that we
can use the full features of the platform.
2024-04-25 16:11:30 -07:00
Saleem Abdulrasool
32b136e9b2
FoundationEssentials: improve Windows coverage for Platform.swift (#546)
Adjust the codepaths to improve Windows support in the file. This is
simply blindly trying to match semantics to reduce the errors reported
during building `FoundationEssentials`.
2024-04-15 11:42:46 -07:00
Saleem Abdulrasool
d7bad7ce73
FoundationEssentials: support symbolic link operations on Windows
This adjusts the symbolic link paths to be supported on Windows. The
symbolic link destination computation is particularly gnarly as it
requires re-defining the device driver interface in a shim header to
access that and then performing aliasing contortions to gain access to
the trailing VLA to get the value.
2024-04-12 11:40:18 -07:00
Saleem Abdulrasool
b80fb683b6
FoundationEssentials: provide typed overloads for constants from WinSDK
This allows for us to use the constants without explicitly casting the
type to `DWORD` on each site of use. By providing the shadowing
overload we can simply use the constants without impacting the
readability of the surrounding code.
2024-04-11 15:53:31 -07:00