public void Delete(PersistentIndexMemoryChunkStatus statusToDelete, bool includeChunksFromEarlierForks) { foreach (string path in GetPathsOfMemoryChunksToDelete(statusToDelete, includeChunksFromEarlierForks)) { BlobManager.Delete(path); } }
public ActionResult Delete(string uri) { // Container Name - picture BlobManager BlobManagerObj = new BlobManager(); BlobManagerObj.Delete(uri); return(RedirectToAction("Get")); }
public async ValueTask PersistMemoryChunksAsync(bool isInitialVersion) { var memoryChunksToPersist = GetUnpersistedMemoryChunks(); long offset = 0; string pathForSingleBlob = ContainedInSingleBlob ? GetPathForMemoryChunk(0) : null; if (ContainedInSingleBlob) { if (isInitialVersion) { if (BlobManager.Exists(pathForSingleBlob)) { BlobManager.Delete(pathForSingleBlob); } offset = 0; } else { offset = BlobManager.GetLength(pathForSingleBlob); } BlobManager.OpenForWriting(pathForSingleBlob); } foreach (var memoryChunkToPersist in memoryChunksToPersist) { await memoryChunkToPersist.LoadMemoryAsync(); int memoryBlockID = memoryChunkToPersist.MemoryBlockID; string path = GetPathForMemoryChunk(memoryBlockID); if (ContainedInSingleBlob) { await BlobManager.AppendAsync(path, memoryChunkToPersist.MemoryAsLoaded.ReadOnlyMemory); UpdateLoadingOffset(memoryChunkToPersist.MemoryBlockID, offset); offset += memoryChunkToPersist.LoadingInfo.PreTruncationLength; } else { BlobManager.Write(path, memoryChunkToPersist.MemoryAsLoaded.ReadOnlyMemory); } memoryChunkToPersist.IsPersisted = true; OnMemoryChunkPersisted(memoryBlockID); } if (ContainedInSingleBlob) { BlobManager.CloseAfterWriting(pathForSingleBlob); } }
public static void DeleteGame(int id) { BlobManager.Delete(GetBlobName(id)); }
public void DeleteIndex() { BlobManager.Delete(GetPathForIndex()); }