Exemplo n.º 1
0
        public virtual async Task DeleteAsync(MediaFile mediaFile)
        {
            Guard.NotNull(mediaFile, nameof(mediaFile));

            var filter = string.Format("{0}*.*", mediaFile.Id.ToString(IdFormatString));

            await foreach (var file in _fileSystem.EnumerateFilesAsync(_thumbsRootDir, filter, deep: true))
            {
                await _fileSystem.TryDeleteFileAsync(file.SubPath);
            }
        }