method
bun.S3Client.delete
path: string,
): Promise<void>;
Delete a file from the bucket. Alias for S3Client.unlink.
@param path
The path to the file in the bucket
@param options
Additional S3 options to override defaults
@returns
A promise that resolves when deletion is complete
// Simple delete
await bucket.delete("old-file.txt");
// With error handling
try {
await bucket.delete("file.dat");
console.log("File deleted");
} catch (err) {
console.error("Delete failed:", err);
}