public override void GarbageCollect(ICollection<byte[]> livingBlobIdentifiers, DateTime createdBefore)
{
if (log.IsDebugEnabled) log.DebugFormat("Beginning Garbage Collection (total living blob identifiers: {0})", livingBlobIdentifiers.Count);
List<byte[]> allExistingIdentifiers = GetAllIdentifiersInFolderCreatedBefore(createdBefore).ToList();
if (log.IsDebugEnabled) log.DebugFormat("Found {0} existing identifiers in path: {1}", allExistingIdentifiers.Count, _path);
foreach (var existingIdnetifier in allExistingIdentifiers)
{
if (!ContainsIdentifier(livingBlobIdentifiers, existingIdnetifier))
{
if (log.IsDebugEnabled) log.DebugFormat("Deleting file because it is no longer referenced: {0}", GetPath(existingIdnetifier));
Delete(existingIdnetifier);
}
}
if (log.IsDebugEnabled) log.DebugFormat("Garbage collection finished");
}