aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-28 19:27:08 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-28 19:27:08 -0500
commit0e4af54cebd4adba3ef32d57f8dbc3920ad28228 (patch)
tree2cd9dd2718af9aae675d689d92d0c256d2b89151 /src
parent34005f37c03e878c2a3286ca0223f921a66a5671 (diff)
downloadslskd-0e4af54cebd4adba3ef32d57f8dbc3920ad28228.tar.gz
tests, strategy enum
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Transfers/Types/DestinationConflictStrategy.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/slskd/Transfers/Types/DestinationConflictStrategy.cs b/src/slskd/Transfers/Types/DestinationConflictStrategy.cs
new file mode 100644
index 00000000..27281a2d
--- /dev/null
+++ b/src/slskd/Transfers/Types/DestinationConflictStrategy.cs
@@ -0,0 +1,49 @@
+// <copyright file="DestinationConflictStrategy.cs" company="JP Dillingham">
+// ▄▄▄▄ ▄▄▄▄ ▄▄▄▄
+// ▄▄▄▄▄▄█ █▄▄▄▄▄█ █▄▄▄▄▄█ █
+// █__ --█ █__ --█ ◄█ - █
+// █▄▄▄▄▄█▄▄█▄▄▄▄▄█▄▄█▄▄█▄▄▄▄▄█
+// ┍━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━ ━ ━┉ ┉ ┉
+// │ Copyright (c) JP Dillingham.
+// │
+// │ 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, version 3.
+// │
+// │ 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/.
+// │
+// │ This program is distributed with Additional Terms pursuant to Section 7
+// │ of the AGPLv3. See the LICENSE file in the root directory of this
+// │ project for the complete terms and conditions.
+// │
+// │ https://slskd.org
+// │
+// ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ╌ ╌╌╌╌ ╌
+// │ SPDX-FileCopyrightText: JP Dillingham
+// │ SPDX-License-Identifier: AGPL-3.0-only
+// ╰───────────────────────────────────────────╶──── ─ ─── ─ ── ──┈ ┈
+// </copyright>
+
+namespace slskd.Transfers;
+
+/// <summary>
+/// Strategy for handling downloaded files with conflicting names.
+/// </summary>
+public enum DestinationConflictStrategy
+{
+ /// <summary>
+ /// Rename the new file by appending something.
+ /// </summary>
+ Rename = 0,
+
+ /// <summary>
+ /// Overwrite the existing file.
+ /// </summary>
+ Overwrite = 1,
+} \ No newline at end of file