aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Transfers/Types
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-05-31 21:17:39 -0500
committerJP Dillingham <jp@dillingham.me>2026-05-31 21:17:39 -0500
commita19fcd796c3acd497388daa0e38f5fa37bf511ee (patch)
tree9cff5b7e687da2bf5819164887edf7ae39adc4bb /src/slskd/Transfers/Types
parent845da6c1c95ed18ec88c93a48f0a04c539f28bc3 (diff)
parent9c8a0cdbb1bf86c1d313919b37446b22a353c7c3 (diff)
downloadslskd-a19fcd796c3acd497388daa0e38f5fa37bf511ee.tar.gz
Merge branch 'destination' of github.com:slskd/slskd into destination
Diffstat (limited to 'src/slskd/Transfers/Types')
-rw-r--r--src/slskd/Transfers/Types/DestinationExistsStrategy.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/slskd/Transfers/Types/DestinationExistsStrategy.cs b/src/slskd/Transfers/Types/DestinationExistsStrategy.cs
new file mode 100644
index 00000000..18837563
--- /dev/null
+++ b/src/slskd/Transfers/Types/DestinationExistsStrategy.cs
@@ -0,0 +1,49 @@
+// <copyright file="DestinationExistsStrategy.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 when the destination file already exists.
+/// </summary>
+public enum DestinationExistsStrategy
+{
+ /// <summary>
+ /// Rename the new file by appending something to the file name.
+ /// </summary>
+ Rename = 0,
+
+ /// <summary>
+ /// Overwrite the existing file.
+ /// </summary>
+ Overwrite = 1,
+} \ No newline at end of file