deleteObject (method)

Deletes an object.

Syntax

- (void)deleteObject:(NSString*)objectName;
public func deleteObject(_ objectName: String) throws -> Void

Remarks

This method deletes the object specified by ObjectName in the bucket currently selected by Bucket.

If the VersionId property is non-empty, this method deletes the specified version of the object instead.

Deleting Versioned Objects

If a bucket has versioning enabled (i.e., VersioningEnabled returns true when queried), and this method is called on an object rather than a specific object version, then instead of actually deleting any data, the server will simply create a special object version called a delete marker.

If an object's latest version is a delete marker, then the server treats the object as if it didn't exist (i.e., it doesn't appear when listing objects, cannot be downloaded, etc.). However, all of the previous versions of the object (including one that existed just before the delete marker was created) still exist; they can be listed using ListVersions, and explicitly interacted with by setting VersionId and calling an appropriate method.

To permanently delete objects in a versioning-enabled bucket, each version of the object must be explicitly deleted by setting VersionId before calling this method. This includes any delete marker versions, which can be deleted like any other version.

Refer to Amazon's Deleting Object Versions, Working with Delete Markers, and Removing Delete Markers articles for more information.

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