From 5cdb5cc91786c5f49bfa1f136c1c71fc52367110 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 27 Sep 2022 09:36:29 -0500 Subject: refactor counting functions --- src/slskd/Shares/SharedFileCache.cs | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/slskd/Shares/SharedFileCache.cs') diff --git a/src/slskd/Shares/SharedFileCache.cs b/src/slskd/Shares/SharedFileCache.cs index 3ff3d10f..190679a8 100644 --- a/src/slskd/Shares/SharedFileCache.cs +++ b/src/slskd/Shares/SharedFileCache.cs @@ -42,20 +42,6 @@ namespace slskd.Shares /// IStateMonitor StateMonitor { get; } - /// - /// Returns the number of directories in the specified . - /// - /// The share for which the directories are to be counted. - /// The number of directories. - int CountDirectories(Share share); - - /// - /// Returns the number of files in the specified . - /// - /// The share for which the files are to be counted. - /// The number of files. - int CountFiles(Share share); - /// /// Scans the configured shares and fills the cache. /// @@ -133,28 +119,6 @@ namespace slskd.Shares private CancellationTokenSource CancellationTokenSource { get; set; } private IShareRepository Repository { get; } - /// - /// Returns the number of directories in the specified . - /// - /// The share for which the directories are to be counted. - /// The number of directories. - public int CountDirectories(Share share) - { - var path = share.RemotePath + Path.DirectorySeparatorChar; - return Repository.CountDirectories(path); - } - - /// - /// Returns the number of files in the specified . - /// - /// The share for which the files are to be counted. - /// The number of files. - public int CountFiles(Share share) - { - var path = share.RemotePath + Path.DirectorySeparatorChar; - return Repository.CountFiles(path); - } - /// /// Scans the configured shares and fills the cache. /// -- cgit v1.2.3