Skip to content

Commit

Permalink
Update FileHandleExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
jihoonahn committed Jan 26, 2024
1 parent 579a2f3 commit b9c99cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/File/Internal/FileHandleExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 }
Expand Down

0 comments on commit b9c99cc

Please sign in to comment.