Exemplo n.º 1
0
        public virtual async Task <(long fileCount, long totalSize)> CacheStatisticsAsync()
        {
            long fileCount = 0;
            long totalSize = 0;

            if (!await _fileSystem.FileExistsAsync(_thumbsRootDir))
            {
                return(0, 0);
            }

            fileCount = await _fileSystem.CountFilesAsync(_thumbsRootDir, deep : true);

            totalSize = await _fileSystem.GetDirectorySizeAsync(_thumbsRootDir);

            return(fileCount, totalSize);
        }