StorageCategoryBehavior
public protocol StorageCategoryBehavior
Behavior of the Storage category used though Amplify.Storage.*
. Plugin implementations
conform to this protocol indirectly though the
StorageCategoryPlugin protocol.
- Tag: StorageCategoryBehavior
-
getURL(key:
Asynchronousoptions: ) Retrieve the remote URL for the object from storage.
Tag: StorageCategoryBehavior.getURL
Declaration
Swift
@available(*, deprecated, message: "Use getURL(path:options:﹚") @discardableResult func getURL( key: String, options: StorageGetURLOperation.Request.Options? ) async throws -> URL
Parameters
key
The unique identifier for the object in storage.
options
Parameters to specific plugin behavior
Return Value
requested Get URL
-
getURL(path:
Asynchronousoptions: ) Retrieve the remote URL for the object from storage.
Tag: StorageCategoryBehavior.getURL
Declaration
Swift
@discardableResult func getURL( path: any StoragePath, options: StorageGetURLOperation.Request.Options? ) async throws -> URL
Parameters
path
the path to the object in storage.
options
Parameters to specific plugin behavior
Return Value
requested Get URL
-
Retrieve the object from storage into memory.
Tag: StorageCategoryBehavior.downloadData
Declaration
Swift
@available(*, deprecated, message: "Use downloadData(path:options:﹚") @discardableResult func downloadData(key: String, options: StorageDownloadDataOperation.Request.Options?) -> StorageDownloadDataTask
Parameters
key
The unique identifier for the object in storage
options
Options to adjust the behavior of this request, including plugin-options
Return Value
A task that provides progress updates and the key which was used to download
-
Retrieve the object from storage into memory.
Tag: StorageCategoryBehavior.downloadData
Declaration
Swift
func downloadData( path: any StoragePath, options: StorageDownloadDataOperation.Request.Options? ) -> StorageDownloadDataTask
Parameters
path
The path for the object in storage
options
Options to adjust the behavior of this request, including plugin-options
Return Value
A task that provides progress updates and the key which was used to download
-
Download to file the object from storage.
Tag: StorageCategoryBehavior.downloadFile
Declaration
Swift
@available(*, deprecated, message: "Use downloadFile(path:options:﹚") @discardableResult func downloadFile( key: String, local: URL, options: StorageDownloadFileOperation.Request.Options? ) -> StorageDownloadFileTask
Parameters
key
The unique identifier for the object in storage.
local
The local file to download destination
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to download
-
Download to file the object from storage.
Tag: StorageCategoryBehavior.downloadFile
Declaration
Swift
@discardableResult func downloadFile( path: any StoragePath, local: URL, options: StorageDownloadFileOperation.Request.Options? ) -> StorageDownloadFileTask
Parameters
path
The path for the object in storage.
local
The local file to download destination
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to download
-
Upload data to storage
Tag: StorageCategoryBehavior.uploadData
Declaration
Swift
@available(*, deprecated, message: "Use uploadData(path:options:﹚") @discardableResult func uploadData( key: String, data: Data, options: StorageUploadDataOperation.Request.Options? ) -> StorageUploadDataTask
Parameters
key
The unique identifier of the object in storage.
data
The data in memory to be uploaded
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to upload
-
Upload data to storage
Tag: StorageCategoryBehavior.uploadData
Declaration
Swift
@discardableResult func uploadData( path: any StoragePath, data: Data, options: StorageUploadDataOperation.Request.Options? ) -> StorageUploadDataTask
Parameters
path
The path of the object in storage.
data
The data in memory to be uploaded
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to upload
-
Upload local file to storage
Tag: StorageCategoryBehavior.uploadFile
Declaration
Swift
@available(*, deprecated, message: "Use uploadFile(path:options:﹚") @discardableResult func uploadFile( key: String, local: URL, options: StorageUploadFileOperation.Request.Options? ) -> StorageUploadFileTask
Parameters
key
The unique identifier of the object in storage.
local
The path to a local file.
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to upload
-
Upload local file to storage
Tag: StorageCategoryBehavior.uploadFile
Declaration
Swift
@discardableResult func uploadFile( path: any StoragePath, local: URL, options: StorageUploadFileOperation.Request.Options? ) -> StorageUploadFileTask
Parameters
path
The path of the object in storage.
local
The path to a local file.
options
Parameters to specific plugin behavior
Return Value
A task that provides progress updates and the key which was used to upload
-
remove(key:
Asynchronousoptions: ) Delete object from storage
Tag: StorageCategoryBehavior.remove
Declaration
Swift
@available(*, deprecated, message: "Use remove(path:options:﹚") @discardableResult func remove( key: String, options: StorageRemoveOperation.Request.Options? ) async throws -> String
Parameters
key
The unique identifier of the object in storage.
options
Parameters to specific plugin behavior
Return Value
An operation object that provides notifications and actions related to the execution of the work
-
remove(path:
Asynchronousoptions: ) Delete object from storage
Tag: StorageCategoryBehavior.remove
Declaration
Swift
@discardableResult func remove( path: any StoragePath, options: StorageRemoveOperation.Request.Options? ) async throws -> String
Parameters
path
The path of the object in storage.
options
Parameters to specific plugin behavior
Return Value
An operation object that provides notifications and actions related to the execution of the work
-
list(options:
Asynchronous) List the object identifiers under the hierarchy specified by the path, relative to access level, from storage
Tag: StorageCategoryBehavior.list
Declaration
Swift
@available(*, deprecated, message: "Use list(path:options:﹚") @discardableResult func list(options: StorageListOperation.Request.Options?) async throws -> StorageListResult
Parameters
options
Parameters to specific plugin behavior
Return Value
An operation object that provides notifications and actions related to the execution of the work
-
list(path:
Asynchronousoptions: ) List the object identifiers under the hierarchy specified by the path, relative to access level, from storage
Tag: StorageCategoryBehavior.list
Declaration
Swift
@discardableResult func list( path: any StoragePath, options: StorageListOperation.Request.Options? ) async throws -> StorageListResult
Parameters
path
The path of the object in storage.
options
Parameters to specific plugin behavior
Return Value
An operation object that provides notifications and actions related to the execution of the work
-
handleBackgroundEvents(identifier:
Asynchronous) Handles background events which are related to URLSession
Tag: StorageCategoryBehavior.handleBackgroundEvents
Declaration
Swift
func handleBackgroundEvents(identifier: String) async -> Bool
Parameters
identifier
identifier
Return Value
returns true if the identifier is handled by Amplify