From 8133ee872bfe07e859fc09bf6ea7062c08249ecb Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 23 Aug 2026 18:08:06 -0500 Subject: docs for GetFileContents --- src/slskd/Files/FileService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/slskd/Files/FileService.cs b/src/slskd/Files/FileService.cs index a78d4dd4..c100c7e9 100644 --- a/src/slskd/Files/FileService.cs +++ b/src/slskd/Files/FileService.cs @@ -365,6 +365,16 @@ namespace slskd.Files }); } + /// + /// Retrieves the contents of the specified as a stream. + /// + /// The file for which contents are to be retrieved. + /// A Stream containing the contents of the file. + /// Thrown if the specified filename is null or contains only whitespace. + /// Thrown if the specified filename contains path traversal segments. + /// Thrown if the specified file is not within an allowed directory. + /// Thrown if the specified file does not exist. + /// Thrown if the file can't be opened for some reason. public virtual Stream GetFileContents(string filename) { ArgumentNullException.ThrowIfNullOrWhiteSpace(filename, nameof(filename)); -- cgit v1.2.3