diff options
| author | JP Dillingham <jp@dillingham.me> | 2024-05-12 15:29:20 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2024-05-12 15:29:20 -0500 |
| commit | 91133c53779c19590586139231537a2ef3df1da0 (patch) | |
| tree | 22ef98ce8d98e2255371131002466155ef97788e /src | |
| parent | dbccaefb3c50ae67f671c91f88d088972d6a7f57 (diff) | |
| download | slskd-91133c53779c19590586139231537a2ef3df1da0.tar.gz | |
remove deprecated code
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 60 |
1 files changed, 1 insertions, 59 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index 90d40b22..8d06fcec 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -1,4 +1,4 @@ -// <copyright file="DownloadService.cs" company="slskd Team"> +// <copyright file="DownloadService.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -603,63 +603,5 @@ namespace slskd.Transfers.Downloads context.Update(transfer); context.SaveChanges(); } - - // private static Stream GetLocalFileStream(string remoteFilename, string saveDirectory) - // { - // var localFilename = remoteFilename.ToLocalFilename(baseDirectory: saveDirectory); - // var path = Path.GetDirectoryName(localFilename); - - // if (!Directory.Exists(path)) - // { - // Directory.CreateDirectory(path); - // } - - // var options = new FileStreamOptions - // { - // Mode = FileMode.Create, - // Access = FileAccess.Write, - // }; - - // if (!OperatingSystem.IsWindows()) - // { - // options.UnixCreateMode = UnixFileMode.GroupExecute | UnixFileMode.GroupRead | UnixFileMode.UserRead | UnixFileMode.UserExecute; - // } - - // return new FileStream(localFilename, options); - // } - - // private static string MoveFile(string filename, string sourceDirectory, string destinationDirectory) - // { - // var sourceFilename = filename.ToLocalFilename(baseDirectory: sourceDirectory); - // var destinationFilename = filename.ToLocalFilename(baseDirectory: destinationDirectory); - - // var destinationPath = Path.GetDirectoryName(destinationFilename); - - // if (!Directory.Exists(destinationPath)) - // { - // Directory.CreateDirectory(destinationPath); - // } - - // if (File.Exists(destinationFilename)) - // { - // string extensionlessFilename = Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename)); - // string extension = Path.GetExtension(filename); - - // while (File.Exists(destinationFilename)) - // { - // string filenameUTC = $"{extensionlessFilename}_{DateTime.UtcNow.Ticks}{extension}"; - // destinationFilename = filenameUTC.ToLocalFilename(destinationDirectory); - // } - // } - - // File.Move(sourceFilename, destinationFilename, overwrite: true); - - // if (!Directory.EnumerateFileSystemEntries(Path.GetDirectoryName(sourceFilename)).Any()) - // { - // Directory.Delete(Path.GetDirectoryName(sourceFilename)); - // } - - // return destinationFilename; - // } } }
\ No newline at end of file |
