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

fixed osx version for #available #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions Sources/GoogleCloudLogging/GoogleCloudLogHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,23 +459,23 @@ extension FileHandle {

@discardableResult
func legacySeekToEnd() throws -> UInt64 {
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
if #available(OSX 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
return try seekToEnd()
} else {
return seekToEndOfFile()
}
}

func legacyWrite<T>(contentsOf data: T) throws where T : DataProtocol {
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
if #available(OSX 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
try write(contentsOf: data)
} else {
write(Data(data))
}
}

func legacyReadToEnd() throws -> Data? {
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
if #available(OSX 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
return try readToEnd()
} else {
return readDataToEndOfFile()
Expand Down