Bir dosyayı silmek için önce söz konusu dosyaya referans oluşturun. Ardından, söz konusu referanstaki Delete() yöntemini çağırın.
// Create a reference to the file to delete.StorageReference*desert_ref=storage_ref.Child("images/desert.jpg");// Delete the fileFuturefuture=desert_ref.Delete();// Wait for operation to complete...if(future.Error()!=firebase::storage::kErrorNone){// Uh-oh, an error occurred!}else{// File deleted successfully}
Hataları işleme
Dosya silme işleminde hataların oluşmasının çeşitli nedenleri vardır. Örneğin, dosyanın mevcut olmaması veya kullanıcının istediği dosyayı silme izninin olmaması. Hatalarla ilgili daha fazla bilgiyi dokümanların Hataları ele alma bölümünde bulabilirsiniz.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-01-29 UTC."],[],[]]