12 Commits

Author SHA1 Message Date
Saleem Abdulrasool
e473ab75be
FoundationEssentials: fix up linkOrCopyFile on Windows (#675)
Adjust the Windows path for copying (or linking) files. This adds the
missing recursion in the copy (the documentation for `CopyFile2` was not
clear that the recursive copy is not performed).
2024-06-12 09:26:03 -07:00
Saleem Abdulrasool
c43fb94fda
FoundationEssentials: correct file overwriting behaviour (#648)
We would previously always overwrite the file which would not match the
expectation. Correct the flags to allow us to properly create or
overwrite the file.
2024-06-03 14:04:37 -07:00
Saleem Abdulrasool
98c8b2983c
FoundationEssentials: add some type overloads for WinSDK (#640)
clang imported types in WinSDK do not sometimes match the expected
types. Add overloads to shadow the types and match expectations. This
repairs the build after #634.
2024-05-29 09:24:54 -07:00
Saleem Abdulrasool
d91433d415
(128068690) FoundationEssentials: repair the Windows build (#608)
Repair the Windows build after recent additions for FileManager.
2024-05-14 11:37:08 -07:00
Jeremy Schonfeld
cae149702b
Add non-darwin search paths (#598)
* Add non-darwin search paths

* Address review feedback

* Resolve build failures

* Resolve more build failures

* Fix test failures
2024-05-10 15:17:19 -07:00
Saleem Abdulrasool
1092331e7d
(127606484) FoundationEssentials: support data writing on Windows (#581)
This implements the IO aspects of data writing for Windows to ensure
that we can support the full API surface.
2024-05-06 11:54:27 -07:00
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