Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "FileOperations: Add Windows implementation for FileDescriptor.resize(to:)" #93

Merged
merged 1 commit into from
Jun 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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