From b9c99cc7fe65608a2ba16cbb71d97f8b8e2173b9 Mon Sep 17 00:00:00 2001 From: Jihoonahn Date: Fri, 26 Jan 2024 18:35:20 +0900 Subject: [PATCH] Update FileHandleExtension --- Sources/File/Internal/FileHandleExt.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/File/Internal/FileHandleExt.swift b/Sources/File/Internal/FileHandleExt.swift index 29030ed2..10f076eb 100644 --- a/Sources/File/Internal/FileHandleExt.swift +++ b/Sources/File/Internal/FileHandleExt.swift @@ -8,7 +8,7 @@ extension FileHandle { /// /// - Note: `seekToEndOfFile()` is deprecated in macOS 10.15.4, so this method provides a replacement. func seekToEndFactory() -> UInt64 { - if #available(macOS 10.15.4, *) { + if #available(iOS 13.4, macOS 10.15.4, tvOS 13.4, watchOS 6.2, visionOS 1.0, *) { do { return try self.seekToEnd() } catch { @@ -25,7 +25,7 @@ extension FileHandle { /// /// - Note: `write(_ data: Data)` is deprecated in macOS 10.15.4, so this method provides a replacement. func writeFactory(_ data: Data) { - if #available(macOS 10.15.4, *) { + if #available(iOS 13.4, macOS 10.15.4, tvOS 13.4, watchOS 6.2, visionOS 1.0, *) { do { try self.write(contentsOf: data) } catch { @@ -40,7 +40,7 @@ extension FileHandle { /// /// - Note: `closeFile()` is deprecated in macOS 10.15, so this method provides a replacement. func closeFileFactory() { - if #available(macOS 10.15, *) { + if #available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, visionOS 1.0, *) { do { try self.close() } catch { return }