Skip to content

Commit 025bcb1

Browse files
authored
Merge pull request #93 from apple/revert-89-sb/resize-windows
Revert "FileOperations: Add Windows implementation for FileDescriptor.resize(to:)"
2 parents 94fa6bd + f5e4aac commit 025bcb1

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Sources/System/FileOperations.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ extension FileDescriptor {
401401
}
402402
#endif
403403

404+
#if !os(Windows)
404405
/*System 1.2.0, @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)*/
405406
extension FileDescriptor {
406407
/// Truncate or extend the file referenced by this file descriptor.
@@ -446,3 +447,4 @@ extension FileDescriptor {
446447
}
447448
}
448449
}
450+
#endif

Sources/System/Internals/WindowsSyscallAdapters.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,4 @@ internal func pwrite(
105105
return Int(nNumberOfBytesWritten)
106106
}
107107

108-
@inline(__always)
109-
internal func ftruncate(
110-
_ fd: Int32,
111-
_ length: off_t
112-
) -> Int32 {
113-
_chsize_s(fd, numericCast(length))
114-
}
115108
#endif

0 commit comments

Comments
 (0)