< Summary - Jellyfin

Information
Class: Jellyfin.Api.Models.SystemInfoDtos.FolderStorageDto
Assembly: Jellyfin.Api
File(s): /srv/git/jellyfin/Jellyfin.Api/Models/SystemInfoDtos/FolderStorageDto.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 46
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
FromFolderStorageInfo(...)100%210%

File(s)

/srv/git/jellyfin/Jellyfin.Api/Models/SystemInfoDtos/FolderStorageDto.cs

#LineLine coverage
 1using MediaBrowser.Model.System;
 2
 3namespace Jellyfin.Api.Models.SystemInfoDtos;
 4
 5/// <summary>
 6/// Contains information about a specific folder.
 7/// </summary>
 8public record FolderStorageDto
 9{
 10    /// <summary>
 11    /// Gets the path of the folder in question.
 12    /// </summary>
 13    public required string Path { get; init; }
 14
 15    /// <summary>
 16    /// Gets the free space of the underlying storage device of the <see cref="Path"/>.
 17    /// </summary>
 18    public long FreeSpace { get; init; }
 19
 20    /// <summary>
 21    /// Gets the used space of the underlying storage device of the <see cref="Path"/>.
 22    /// </summary>
 23    public long UsedSpace { get; init; }
 24
 25    /// <summary>
 26    /// Gets the kind of storage device of the <see cref="Path"/>.
 27    /// </summary>
 28    public string? StorageType { get; init; }
 29
 30    /// <summary>
 31    /// Gets the Device Identifier.
 32    /// </summary>
 33    public string? DeviceId { get; init; }
 34
 35    internal static FolderStorageDto FromFolderStorageInfo(FolderStorageInfo model)
 36    {
 037        return new()
 038        {
 039            Path = model.Path,
 040            FreeSpace = model.FreeSpace,
 041            UsedSpace = model.UsedSpace,
 042            StorageType = model.StorageType,
 043            DeviceId = model.DeviceId
 044        };
 45    }
 46}