aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Files
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Files')
-rw-r--r--src/slskd/Files/IFileService.cs47
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);
+ }
+}