12 Commits

Author SHA1 Message Date
Saleem Abdulrasool
3a7c84e3f6
FoundationEssentials: add withNTPathRepresentation (#531)
This helper allows us to convert paths to the NT path representation.
The NT Path representation is important for internal usage as it allows
us to bypass the `MAX_PATH` (261) limit for Win32 APIs. In order to do
this, we simply escape the string with the NT prefix (`\\?\`) which
requires that the path is normalised (uses `\` rather than `/`) and
generally should be an absolute path. Using the NT path allows us to use
the fully supported 32k character path length of the NT kernel.

Co-authored-by: Alexander Smarus <bender@readdle.com>
Co-authored-by: Jeremy Schonfeld <1004103+jmschonfeld@users.noreply.github.com>
2024-04-09 14:22:32 -07:00
Jeremy Schonfeld
61f97b6e52
(123444217) Avoid filling FSR with partial scalars on failure 2024-04-09 09:29:54 -07:00
Jeremy Schonfeld
e5211f2926
(122981400) Standardize on using internal import 2024-03-06 13:42:02 -08:00
Jeremy Schonfeld
039c4d683c
Efficient buffer size calculation for String file system representation
* Use smaller buffer for file system representation

* Reword scalars -> code-units

Co-authored-by: Karl <5254025+karwa@users.noreply.github.com>

---------

Co-authored-by: Karl <5254025+karwa@users.noreply.github.com>
2024-02-13 13:21:16 -08:00
Jeremy Schonfeld
39dc85e87c
(122536991) File system representations should not be limited to PATH_MAX 2024-02-09 16:33:38 -08:00
Jeremy Schonfeld
a163cbe9a8
(122199292) Guard against UTF8 buffers from large strings 2024-02-02 16:37:59 -08:00
Tony Parker
4499edd7b1
Implement Data reading and writing (#377)
* Implement Data reading and writing

* Use swift-foundation-local for dependency name in benchmark
2024-01-17 13:04:41 -08:00
Jeremy Schonfeld
7f1bcff03b
Fix an off by one error in Strings file system representation 2024-01-04 13:42:50 -08:00
Jeremy Schonfeld
ea334c656b
(118839391) Implement file system representation for String
* (118839391) Implement file system representation for String

* (118839391) Fix some build issues

* (118839391) Fix embedded nulls and precomposed characters
2023-12-14 10:02:20 -08:00
Tony Parker
3d52b255b7
Move String additions from _FoundationInternals to FoundationEssentials + package (#282) 2023-10-04 16:38:28 -07:00
Tony Parker
9fae9b1c6b
Revert "Move String additions from _FoundationInternals to FoundationEssentials + package" (#281)
This reverts commit 3a17834c7f397c9b83085008cad99eca7d7f3735.
2023-10-04 15:39:55 -07:00
Tony Parker
3a17834c7f
Move String additions from _FoundationInternals to FoundationEssentials + package 2023-10-04 15:24:17 -07:00