Skip to content

Commit

Permalink
chore: Marking Storage's key-based API as deprecated in the Category …
Browse files Browse the repository at this point in the history
…implementation.
  • Loading branch information
ruisebas committed Sep 13, 2024
1 parent 59eb807 commit 90c315c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

extension StorageCategory: StorageCategoryBehavior {

@available(*, deprecated, message: "Use getURL(path:options:)")
@discardableResult
public func getURL(
key: String,
Expand All @@ -25,6 +26,7 @@ extension StorageCategory: StorageCategoryBehavior {
try await plugin.getURL(path: path, options: options)
}

@available(*, deprecated, message: "Use downloadData(path:options:)")
@discardableResult
public func downloadData(
key: String,
Expand All @@ -41,6 +43,7 @@ extension StorageCategory: StorageCategoryBehavior {
plugin.downloadData(path: path, options: options)
}

@available(*, deprecated, message: "Use downloadFile(path:options:)")
@discardableResult
public func downloadFile(
key: String,
Expand All @@ -59,6 +62,7 @@ extension StorageCategory: StorageCategoryBehavior {
plugin.downloadFile(path: path, local: local, options: options)
}

@available(*, deprecated, message: "Use uploadData(path:options:)")
@discardableResult
public func uploadData(
key: String,
Expand All @@ -77,6 +81,7 @@ extension StorageCategory: StorageCategoryBehavior {
plugin.uploadData(path: path, data: data, options: options)
}

@available(*, deprecated, message: "Use uploadFile(path:options:)")
@discardableResult
public func uploadFile(
key: String,
Expand All @@ -95,6 +100,7 @@ extension StorageCategory: StorageCategoryBehavior {
plugin.uploadFile(path: path, local: local, options: options)
}

@available(*, deprecated, message: "Use remove(path:options:)")
@discardableResult
public func remove(
key: String,
Expand All @@ -111,6 +117,7 @@ extension StorageCategory: StorageCategoryBehavior {
try await plugin.remove(path: path, options: options)
}

@available(*, deprecated, message: "Use list(path:options:)")
@discardableResult
public func list(
options: StorageListOperation.Request.Options? = nil
Expand Down

0 comments on commit 90c315c

Please sign in to comment.