mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
19 lines
357 B
Swift
19 lines
357 B
Swift
// Copyright (c) 2024 Timofey Solomko
|
|
// Licensed under MIT License
|
|
//
|
|
// See LICENSE for license informations
|
|
|
|
import Foundation
|
|
|
|
extension FileHandle {
|
|
|
|
func closeCompat() throws {
|
|
if #available(macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
|
|
try self.close()
|
|
} else {
|
|
self.closeFile()
|
|
}
|
|
}
|
|
|
|
}
|