From 9a005447ef2f6726b2139b0ae4d99cf566ef365b Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 11 May 2024 15:57:05 -0500 Subject: simplify file service --- src/slskd/Files/IFileService.cs | 74 ----------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 src/slskd/Files/IFileService.cs (limited to 'src/slskd/Files/IFileService.cs') diff --git a/src/slskd/Files/IFileService.cs b/src/slskd/Files/IFileService.cs deleted file mode 100644 index 89d4ce76..00000000 --- a/src/slskd/Files/IFileService.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// 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/. -// - -namespace slskd.Files -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Security; - using System.Threading.Tasks; - using OneOf; - - /// - /// Manages files on disk. - /// - public interface IFileService - { - /// - /// Deletes the specified . - /// - /// - /// Returns a dictionary keyed on directory name and containing a result for each specified directory. Exceptions are - /// contained in the result, and are not thrown. - /// - /// The directories to delete. - /// The operation context. - /// Thrown if any of the specified directories have a relative path. - /// - /// Thrown if any of the directories is an exact match for an application-controlled directory. - /// - /// Thrown if a specified directory does not exist. - /// Thrown if a specified directory is restricted. - Task>> DeleteDirectoriesAsync(params string[] directories); - - /// - /// Deletes the specified . - /// - /// - /// Returns a dictionary keyed on directory name and containing a result for each specified directory. Exceptions are - /// contained in the result, and are not thrown. - /// - /// The list of files to delete. - /// The operation context. - /// Thrown if any of the specified files have a relative path. - /// Thrown if a specified file does not exist. - /// Thrown if a specified file is restricted. - Task>> DeleteFilesAsync(params string[] files); - - /// - /// Lists the contents in the specified , optionally applying the specified . - /// - /// The directory from which to start the listing. - /// Optional enumeration options to apply. - /// The list of found contents. - /// Thrown if the specified directory has a relative path. - /// Thrown if the specified directory does not exist. - /// Thrown if the specified root directory is restricted. - Task ListContentsAsync(string directory, EnumerationOptions enumerationOptions = null); - } -} \ No newline at end of file -- cgit v1.2.3