Skip to content

Commit

Permalink
Revert "FileOperations: Add Windows implementation for FileDescriptor…
Browse files Browse the repository at this point in the history
….resize(to:) (#89)"

This reverts commit 94fa6bd.
  • Loading branch information
lorentey authored Jun 11, 2022
1 parent 94fa6bd commit f5e4aac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Sources/System/FileOperations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ extension FileDescriptor {
}
#endif

#if !os(Windows)
/*System 1.2.0, @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)*/
extension FileDescriptor {
/// Truncate or extend the file referenced by this file descriptor.
Expand Down Expand Up @@ -446,3 +447,4 @@ extension FileDescriptor {
}
}
}
#endif
7 changes: 0 additions & 7 deletions Sources/System/Internals/WindowsSyscallAdapters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,4 @@ internal func pwrite(
return Int(nNumberOfBytesWritten)
}

@inline(__always)
internal func ftruncate(
_ fd: Int32,
_ length: off_t
) -> Int32 {
_chsize_s(fd, numericCast(length))
}
#endif

0 comments on commit f5e4aac

Please sign in to comment.