Karoy Lorentey
025bcb1165
Merge pull request #93 from apple/revert-89-sb/resize-windows
...
Revert "FileOperations: Add Windows implementation for FileDescriptor.resize(to:)"
1.2.1
2022-06-11 12:57:28 -07:00
Karoy Lorentey
f5e4aac51b
Revert "FileOperations: Add Windows implementation for FileDescriptor.resize(to:) ( #89 )"
...
This reverts commit 94fa6bd2ff .
2022-06-11 12:54:19 -07:00
Si Beaumont
94fa6bd2ff
FileOperations: Add Windows implementation for FileDescriptor.resize(to:) ( #89 )
...
* FileOperations: Add Windows implementation for FileDescriptor.resize(to:)
Replace _chsize with _chsize_s on Windows
1.2.0
2022-06-09 09:51:28 -06:00
Alsey Coleman Miller
a552fda216
Import C module as @_implementationOnly ( #83 )
2022-06-08 19:54:55 -06:00
Guillaume Lessard
bdb13a5a80
Merge pull request #80 from apple/glessard/rdar91436410
...
Mitigate misuse of Swift's pointer conversion feature
2022-06-03 16:52:30 -06:00
Guillaume Lessard
3920df78d9
Correct deprecation messages
2022-06-03 16:43:25 -06:00
Guillaume Lessard
469ede0fa2
Add tests for every new overload added
2022-06-03 16:43:25 -06:00
Guillaume Lessard
afe2d35d0b
Mitigate misuse of pointer conversion in FilePath inits
2022-06-03 16:43:25 -06:00
Guillaume Lessard
25380a1bea
Mitigate misuse of pointer conversion in String inits
2022-06-03 16:43:25 -06:00
Karoy Lorentey
74eb6f4ef8
Merge pull request #77 from amartini51/docs/develop
...
Fix broken links.
2022-06-03 15:37:23 -07:00
Alex Martini
6db5a4a43b
Fix broken links.
...
Fixes rdar://79096457
2022-06-03 15:23:53 -07:00
Karoy Lorentey
5ba9e8fa77
Merge pull request #79 from apple/glessard/binding-fixes
...
Rebind byte types safely
2022-06-03 15:16:40 -07:00
Guillaume Lessard
914c782b96
Replace assumingMemoryBound with temporary rebinding
...
- this doesn’t use the new memory binding API.
2022-05-27 18:09:45 -06:00
Karoy Lorentey
82a6704912
Merge pull request #88 from apple/lorentey/unbroke-windows
...
Unbreak the Windows port
2022-05-21 12:46:19 -07:00
Karoy Lorentey
bd5a7bb703
Remove test of minimal value
2022-05-21 12:44:00 -07:00
Karoy Lorentey
147ebc053a
Unbreak the Windows port
2022-05-21 12:43:59 -07:00
Karoy Lorentey
5c18991f29
Merge pull request #82 from simonjbeaumont/sb/resize
...
FileDescriptor: Add resize(to newSize:) and fileSize() APIs
2022-05-20 11:30:26 -07:00
Si Beaumont
7bb5279b57
fixup: Tests run in parallel; use unique temp file name
...
Signed-off-by: Si Beaumont <beaumont@apple.com >
2022-05-20 19:25:41 +01:00
Si Beaumont
865fd70605
Merge branch 'main' into sb/resize
2022-05-20 18:26:33 +01:00
Si Beaumont
ca6e888455
Utilities: Add version 1.2.0 to expand-availability.py tool
...
Signed-off-by: Si Beaumont <beaumont@apple.com >
2022-05-20 18:24:28 +01:00
Si Beaumont
fea7d5030d
docs: Removed duplicate paragraph from FileDescriptor.writeAll(_:) docs ( #85 )
2022-05-16 07:28:47 -07:00
Si Beaumont
d90bf8529a
fixup: Move FileDescriptor.fileSize() to an internal extension in SystemTests
2022-05-06 11:55:00 +01:00
Si Beaumont
02daf4b6a7
fixup: Move FileDescriptor.resize to extension with #if !os(Windows)
2022-05-06 11:55:00 +01:00
Si Beaumont
7fab65f340
fixup: Remove Windows syscall adaptor for ftruncate
2022-05-06 11:09:20 +01:00
Si Beaumont
5d3519dcef
FileOperations: Add FileDescriptor.resize, using ftruncate(2)
...
Signed-off-by: Si Beaumont <beaumont@apple.com >
2022-05-05 08:24:48 +01:00
Si Beaumont
23ac190631
FileHelpers: Add FileDescriptor.fileSize
...
Signed-off-by: Si Beaumont <beaumont@apple.com >
2022-05-04 12:33:03 +01:00
Daniel Duan
a77a331dc7
Update Linux test manifests ( #81 )
...
Run `swift package --generate-linuxmain` results in this patch.
2022-04-20 14:22:03 -06:00
Karoy Lorentey
1d5e35a460
Merge pull request #75 from lorentey/introduce-availability-macros
...
Unify availability annotations & introduce a script to manage them
2021-12-21 13:07:07 -08:00
Karoy Lorentey
fd82b5a0ce
Fix docs
2021-12-20 17:52:59 -08:00
Karoy Lorentey
0c24d31e08
Add script to manage availability annotations
...
By running this script, we can expand comments of the form
```
/*System 0.0.1*/
```
Into either a longer comment that includes the associated OS versions numbers,
```
/*System 0.0.1, @available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)*/
```
or, when the `--attribute` option is used, into an actual `@available` attribute:
```
/*System 0.0.1*/@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
```
The script can be run repeatedly to switch between these two forms, as needed.
2021-12-20 17:14:42 -08:00
Karoy Lorentey
1daa0c9677
Unify availability annotations and synchronize them with macOS 12 / iOS 15
...
Availability annotations now follow a rigid syntax that mentions the swift-system version that introduced the entry point:
```
/*System 0.0.2, @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)*/
public func greeting() -> String {
"Hello"
}
```
This is designed to be processed by automated source generation tools.
2021-12-20 17:10:59 -08:00
Saleem Abdulrasool
836bc4557b
Merge pull request #74 from compnerd/leaky-cauldron
...
build: install CSystem into the system
1.1.1
2021-12-02 11:22:32 -08:00
Saleem Abdulrasool
5d68cf0eca
build: install CSystem into the system
...
CSystem is a leaky library dependency from System and must be
distributed. Install the files and make the dependency public so that
it is emitted into the clients.
2021-12-02 09:19:43 -08:00
tomer doron
5703dc2b4d
update cmake setup so that the library can be used by SwiftPM cmake build ( #73 )
...
Update cmake setup so that the library can be used by SwiftPM cmake build
Motivation: integrate with SwiftPM
changes:
* rename the top level project to SwiftSystem instead of swift-system to align with other projects
* rename System to SystemPackage to align with SwifPM setup
* update architectures to include arm64
* Update cmake/modules/SwiftSystemConfig.cmake.in
* Update cmake/modules/SwiftSupport.cmake
1.1.0
2021-11-30 10:50:50 -07:00
Alex Martini
2fa26782e1
Merge pull request #69 from amartini51/docs/develop
...
Minor fixes in documentation comments
2021-11-09 10:11:05 -08:00
Alex Martini
0c291a65c2
Fix typo.
...
Fixes <rdar://problem/84559893>.
2021-11-08 19:43:49 -08:00
Alex Martini
0ac080ea56
Add missing period at end of abstract.
2021-11-08 19:43:30 -08:00
Alex Martini
d2c4e4507a
Fix spacing and indentation.
2021-11-08 19:43:30 -08:00
Alex Martini
78847afcd4
Remove stray word.
2021-11-08 19:43:30 -08:00
George Lyon
689390f50f
Implement FileDescriptor.Pipe() ( #58 )
...
Adds support for pipe(2)
2021-09-27 16:02:52 -06:00
Michael Ilseman
ce8b491073
Update README for 1.0
1.0.0
2021-09-01 09:26:18 -06:00
YR Chen
39774ef16a
Simplify Package.swift
0.0.3
2021-08-05 10:05:06 -06:00
YR Chen
58a2725013
Fix building on Windows
2021-08-05 10:05:06 -06:00
Rauhul Varma
e520e61616
Fix SystemChar isLetter logic
...
- Fixes range expression in isLetter logic and adds test coverage.
2021-08-05 10:03:53 -06:00
Rauhul Varma
4f36710d0b
Expose O_DIRECTORY as api
...
- Adds a `directory` OpenOptions as a type-safe version of O_DIRECTORY.
Allows clients to only open a FileDescriptor for FilePaths that refer
to directories.
2021-07-14 18:24:52 -06:00
Alex Martini
591ff41944
Move TODO and FIXME markers to normal comments.
...
When they appear in triple-slash comments, that makes them part of the
actual documentation that gets published.
Fixes <rdar://problem/79071171>.
2021-06-10 16:34:32 -06:00
Michael Ilseman
2bc160bfe3
FilePath.Component.Kind is meant to be frozen
0.0.2
v0.0.2
2021-05-13 15:42:38 -06:00
Michael Ilseman
578586ab80
Un-deprecate withCString
...
Un-deprecate withCString, but make sure it's not available on Windows (because
the types will not match). withPlatformString is still the preferred
expression of this and favors more portable code.
2021-05-10 13:32:31 -06:00
Michael Ilseman
8e3c23987f
[testing] Generalize interruptable behavior to support non-erroring syscalls
2021-03-22 15:58:10 -06:00
Michael Ilseman
090d109c0f
Make retryOnInterrupt always explicit internally
2021-03-22 15:58:10 -06:00