diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Package.swift b/Package.swift index 64ef78e..44b465f 100644 --- a/Package.swift +++ b/Package.swift @@ -7,6 +7,7 @@ let package = Package( name: "Bodega", platforms: [ .iOS(.v13), + .tvOS(.v13), .macOS(.v11), ], products: [ diff --git a/Sources/Bodega/FileManager.Directory.swift b/Sources/Bodega/FileManager.Directory.swift index 2b6ae9a..b5d455a 100644 --- a/Sources/Bodega/FileManager.Directory.swift +++ b/Sources/Bodega/FileManager.Directory.swift @@ -28,7 +28,7 @@ public extension FileManager.Directory { /// - Parameter pathComponent: A path to append to the platform's documents directory. static func documents(appendingPath pathComponent: String) -> Self { let url: URL - if #available(iOS 16.0, macOS 13.0, *) { + if #available(iOS 16.0, macOS 13.0, tvOS 16.0, *) { url = URL.documentsDirectory.appending(path: pathComponent) } else { url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent(pathComponent) @@ -41,7 +41,7 @@ public extension FileManager.Directory { /// - Parameter pathComponent: A path to append to the platform's caches directory. static func caches(appendingPath pathComponent: String) -> Self { let url: URL - if #available(iOS 16.0, macOS 13.0, *) { + if #available(iOS 16.0, macOS 13.0, tvOS 16.0, *) { url = URL.cachesDirectory.appending(path: pathComponent) } else { url = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first!.appendingPathComponent(pathComponent) @@ -54,7 +54,7 @@ public extension FileManager.Directory { /// - Parameter pathComponent: A path to append to the platform's temporary directory. static func temporary(appendingPath pathComponent: String) -> Self { let url: URL - if #available(iOS 16.0, macOS 13.0, *) { + if #available(iOS 16.0, macOS 13.0, tvOS 16.0, *) { url = URL.temporaryDirectory.appending(path: pathComponent) } else { url = FileManager.default.temporaryDirectory.appendingPathComponent(pathComponent)