IPWorks Cloud 2020 macOS Edition

Questions / Feedback?

DeleteFile Method

Deletes all versions of a file.

Syntax

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 Capabilities 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 macOS Edition - Version 20.0 [Build 8265]