mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Implements directory browser dialog, part 1: file system treeview
This commit is contained in:
1 parent
4a53348013
commit
4e4ecbbfca
318 files changed
+6012
-1184
No files matched your search
@@ -0,0 +1,46 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Enums.FileSystem;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Generic file system node.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{Path}")]
|
||||
public class FileSystemTreeNodeResponse
|
||||
{
|
||||
#region ==================================================================== PROPERTIES =================================================================================
|
||||
/// <summary>
|
||||
/// Gets or sets the full path of the file or directory.
|
||||
/// </summary>
|
||||
public string Path { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the file or directory.
|
||||
/// </summary>
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the item, indicating whether it is a file, directory, or drive.
|
||||
/// </summary>
|
||||
public FileSystemItemType ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the node is expanded.
|
||||
/// </summary>
|
||||
public bool IsExpanded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the child nodes have been loaded.
|
||||
/// </summary>
|
||||
public bool ChildrenLoaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of child nodes.
|
||||
/// </summary>
|
||||
public List<FileSystemTreeNodeResponse> Children { get; set; } = [];
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Contracts.Enums.FileSystem;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Contracts.Responses.FileManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing the file system platform type.
|
||||
/// </summary>
|
||||
/// <param name="PlatformType">The returned file system platform type.</param>
|
||||
public record FileSystemTypeResponse(
|
||||
PlatformType PlatformType
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Lumina.Contracts.Responses.FileManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing a file system path.
|
||||
/// </summary>
|
||||
/// <param name="Path">The returned path.</param>
|
||||
public record PathSegmentResponse(
|
||||
string Path
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Lumina.Contracts.Responses.FileManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response to the inquiry about the system's path separator.
|
||||
/// </summary>
|
||||
/// <param name="Separator">The system's path separator.</param>
|
||||
public record PathSeparatorResponse(
|
||||
string Separator
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Lumina.Contracts.Responses.FileManagement;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a response containing the result of splitting a file system path.
|
||||
/// </summary>
|
||||
/// <param name="PathSegments">The returned path segments.</param>
|
||||
public record SplitPathResponse(
|
||||
string[] PathSegments
|
||||
);
|
||||
Reference in new issue
Block a user