| | | 1 | | using MediaBrowser.Model.System; |
| | | 2 | | |
| | | 3 | | namespace Jellyfin.Api.Models.SystemInfoDtos; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Contains information about a specific folder. |
| | | 7 | | /// </summary> |
| | | 8 | | public 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 | | { |
| | 0 | 37 | | return new() |
| | 0 | 38 | | { |
| | 0 | 39 | | Path = model.Path, |
| | 0 | 40 | | FreeSpace = model.FreeSpace, |
| | 0 | 41 | | UsedSpace = model.UsedSpace, |
| | 0 | 42 | | StorageType = model.StorageType, |
| | 0 | 43 | | DeviceId = model.DeviceId |
| | 0 | 44 | | }; |
| | | 45 | | } |
| | | 46 | | } |