aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Files/Types
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-07-01 15:12:17 -0500
committerJP Dillingham <jp@dillingham.me>2023-07-01 15:12:17 -0500
commit94712ee9915cd46212b589e283a211545ec1141e (patch)
treea50433c64e00e0dd1e6386f84590e5fe9e73f1f8 /src/slskd/Files/Types
parent7316f144c2fca00fbcfe54b65846a4102ea536ab (diff)
downloadslskd-94712ee9915cd46212b589e283a211545ec1141e.tar.gz
docs
Diffstat (limited to 'src/slskd/Files/Types')
-rw-r--r--src/slskd/Files/Types/FilesystemDirectory.cs35
-rw-r--r--src/slskd/Files/Types/FilesystemFile.cs31
2 files changed, 66 insertions, 0 deletions
diff --git a/src/slskd/Files/Types/FilesystemDirectory.cs b/src/slskd/Files/Types/FilesystemDirectory.cs
index 9e573906..6628ce15 100644
--- a/src/slskd/Files/Types/FilesystemDirectory.cs
+++ b/src/slskd/Files/Types/FilesystemDirectory.cs
@@ -21,16 +21,51 @@ namespace slskd.Files
using System.Collections.Generic;
using System.IO;
+ /// <summary>
+ /// A file directory on the host filesystem.
+ /// </summary>
public record FilesystemDirectory
{
+ /// <summary>
+ /// The name of the directory.
+ /// </summary>
public string Name { get; init; }
+
+ /// <summary>
+ /// The fully qualified name of the directory.
+ /// </summary>
public string FullName { get; init; }
+
+ /// <summary>
+ /// The directories' attributes.
+ /// </summary>
public FileAttributes Attributes { get; init; }
+
+ /// <summary>
+ /// The timestamp at which the directory was created.
+ /// </summary>
public DateTime CreatedAt { get; init; }
+
+ /// <summary>
+ /// The timestamp at which the directory was last modified.
+ /// </summary>
public DateTime ModifiedAt { get; init; }
+
+ /// <summary>
+ /// The files within the directory.
+ /// </summary>
public IEnumerable<FilesystemFile> Files { get; init; }
+
+ /// <summary>
+ /// The directories within the directory.
+ /// </summary>
public IEnumerable<FilesystemDirectory> Directories { get; init; }
+ /// <summary>
+ /// Maps a <see cref="FilesystemDirectory"/> from the specified <see cref="DirectoryInfo"/>.
+ /// </summary>
+ /// <param name="i">The DirectoryInfo instance from which to map.</param>
+ /// <returns>A new instance of FilesystemDirectory.</returns>
public static FilesystemDirectory FromDirectoryInfo(DirectoryInfo i)
{
return new FilesystemDirectory
diff --git a/src/slskd/Files/Types/FilesystemFile.cs b/src/slskd/Files/Types/FilesystemFile.cs
index fc36fff0..0b6feeb5 100644
--- a/src/slskd/Files/Types/FilesystemFile.cs
+++ b/src/slskd/Files/Types/FilesystemFile.cs
@@ -20,15 +20,46 @@ namespace slskd.Files
using System;
using System.IO;
+ /// <summary>
+ /// A file on the host filesystem.
+ /// </summary>
public record FilesystemFile
{
+ /// <summary>
+ /// The name of the file.
+ /// </summary>
public string Name { get; init; }
+
+ /// <summary>
+ /// The fully qualified name of the file.
+ /// </summary>
public string FullName { get; init; }
+
+ /// <summary>
+ /// The size of the file, in bytes.
+ /// </summary>
public long Length { get; init; }
+
+ /// <summary>
+ /// The file's attributes.
+ /// </summary>
public FileAttributes Attributes { get; init; }
+
+ /// <summary>
+ /// The timestamp at which the file was created.
+ /// </summary>
public DateTime CreatedAt { get; init; }
+
+ /// <summary>
+ /// The timestamp at which the file was last modified.
+ /// </summary>
public DateTime ModifiedAt { get; init; }
+ /// <summary>
+ /// Maps a <see cref="FilesystemFile"/> from the specified <see cref="FileInfo"/>.
+ /// </summary>
+ /// <param name="i">The FileInfo instance from which to map.</param>
+ /// <returns>A new instance of FilesystemFile.</returns>
public static FilesystemFile FromFileInfo(FileInfo i)
{
return new FilesystemFile