IPWorks Cloud 2020 iOS Edition

Questions / Feedback?

deleteFile (method)

Deletes all versions of a file.

Syntax

- (void)deleteFile:(NSString*)bucketId :(NSString*)fileName;
public func deleteFile(_ bucketId: String, _ fileName: String) throws -> Void

Remarks

This method deletes all versions of the file named FileName from the bucket specified by BucketId. If the latest "version" of the specified file is an incomplete multipart upload, the multipart upload is aborted.

The currently-authenticated application key must have the listFiles and deleteFiles capabilities to call this method successfully, otherwise the server will return an error. Refer to the AccountCapabilities property for more information.

Note: This method is offered as a convenience, as the Backblaze B2 REST API does not technically provide a way to delete all versions of a file using a single request. When this method is called, the class uses ListFileVersions to obtain a list of all versions of the specified file, and then uses DeleteFileVersion to delete each one, in order from oldest to newest. If any one request made during this process fails, this method will fail immediately. This process does not alter the File* or FileMarker properties, nor does it cause the FileList event to fire.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 iOS Edition - Version 20.0 [Build 8265]