diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-06-19 22:32:09 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2023-06-19 22:32:09 -0500 |
| commit | f42aeae2f9db1d10e0804c6d798abb608eebe585 (patch) | |
| tree | d07dcd271b06191b0ea2fd396b25907297d19d7b /src | |
| parent | 37032356080e05b23e54db48d58c62fc0159754a (diff) | |
| download | slskd-f42aeae2f9db1d10e0804c6d798abb608eebe585.tar.gz | |
just pass EnumerationOptions
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Files/IFileService.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/slskd/Files/IFileService.cs b/src/slskd/Files/IFileService.cs new file mode 100644 index 00000000..a02f7a79 --- /dev/null +++ b/src/slskd/Files/IFileService.cs @@ -0,0 +1,47 @@ +// <copyright file="IFileService.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd.Files +{ + using System.Collections.Generic; + using System.IO; + using System.Threading.Tasks; + + /// <summary> + /// Manages files on disk. + /// </summary> + public interface IFileService + { + /// <summary> + /// Recursively lists all of the files in the downloads directory, starting from the optional <paramref name="parentDirectory"/>, and + /// optionally applying the specified <paramref name="enumerationOptions"/>. + /// </summary> + /// <param name="parentDirectory">An optional parent directory from which to begin searching.</param> + /// <param name="enumerationOptions">Optional enumeration options to apply.</param> + /// <returns>The list of found files.</returns> + Task<IEnumerable<FileInfo>> ListDownloadedFiles(string parentDirectory = null, EnumerationOptions enumerationOptions = null); + + /// <summary> + /// Recursively lists all of the files in the incomplete directory, starting from the optional <paramref name="parentDirectory"/>, and + /// optionally applying the specified <paramref name="enumerationOptions"/>. + /// </summary> + /// <param name="parentDirectory">An optional parent directory from which to begin searching.</param> + /// <param name="enumerationOptions">Optional enumeration options to apply.</param> + /// <returns>The list of found files.</returns> + Task<IEnumerable<FileInfo>> ListIncompleteFiles(string parentDirectory = null, EnumerationOptions enumerationOptions = null); + } +} |
