diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-09-27 09:36:29 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-09-27 09:36:29 -0500 |
| commit | 5cdb5cc91786c5f49bfa1f136c1c71fc52367110 (patch) | |
| tree | f4d8ef5ee04921e10f90e0491483bc82f48d13dd /src/slskd/Shares/SharedFileCache.cs | |
| parent | f29414b34b05ab74ecbfa97c03917fb886dc886e (diff) | |
| download | slskd-5cdb5cc91786c5f49bfa1f136c1c71fc52367110.tar.gz | |
refactor counting functions
Diffstat (limited to 'src/slskd/Shares/SharedFileCache.cs')
| -rw-r--r-- | src/slskd/Shares/SharedFileCache.cs | 36 |
1 files changed, 0 insertions, 36 deletions
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 @@ -43,20 +43,6 @@ namespace slskd.Shares IStateMonitor<SharedFileCacheState> StateMonitor { get; } /// <summary> - /// Returns the number of directories in the specified <paramref name="share"/>. - /// </summary> - /// <param name="share">The share for which the directories are to be counted.</param> - /// <returns>The number of directories.</returns> - int CountDirectories(Share share); - - /// <summary> - /// Returns the number of files in the specified <paramref name="share"/>. - /// </summary> - /// <param name="share">The share for which the files are to be counted.</param> - /// <returns>The number of files.</returns> - int CountFiles(Share share); - - /// <summary> /// Scans the configured shares and fills the cache. /// </summary> /// <param name="shares">The list of shares from which to fill the cache.</param> @@ -134,28 +120,6 @@ namespace slskd.Shares private IShareRepository Repository { get; } /// <summary> - /// Returns the number of directories in the specified <paramref name="share"/>. - /// </summary> - /// <param name="share">The share for which the directories are to be counted.</param> - /// <returns>The number of directories.</returns> - public int CountDirectories(Share share) - { - var path = share.RemotePath + Path.DirectorySeparatorChar; - return Repository.CountDirectories(path); - } - - /// <summary> - /// Returns the number of files in the specified <paramref name="share"/>. - /// </summary> - /// <param name="share">The share for which the files are to be counted.</param> - /// <returns>The number of files.</returns> - public int CountFiles(Share share) - { - var path = share.RemotePath + Path.DirectorySeparatorChar; - return Repository.CountFiles(path); - } - - /// <summary> /// Scans the configured shares and fills the cache. /// </summary> /// <param name="shares">The list of shares from which to fill the cache.</param> |
