DirectoryNode.md

January 20, 2026 Ā· View on GitHub

Atypical.VirtualFileSystem.Core

Atypical.VirtualFileSystem.Core

DirectoryNode Class

Represents a directory in the virtual file system.

public record DirectoryNode : Atypical.VirtualFileSystem.Core.VFSNode, Atypical.VirtualFileSystem.Core.Contracts.IDirectoryNode, Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode, System.IEquatable<Atypical.VirtualFileSystem.Core.DirectoryNode>

Inheritance System.Object šŸ”’ VFSNode šŸ”’ DirectoryNode

Derived
↳ RootNode

Implements IDirectoryNode, IVirtualFileSystemNode, System.IEquatable<DirectoryNode>

Constructors
DirectoryNode(VFSDirectoryPath)Initializes a new instance of the DirectoryNode class. Creates a new directory node. The directory is created with the current date and time as creation and last modification date.
Properties
DirectoriesGets the child directories of the node.
FilesGets the child files of the node.
IsDirectoryIndicates whether the node is a directory.
IsFileIndicates whether the node is a file.
Methods
AddChild(IVirtualFileSystemNode)x Adds a child node to the current directory.
RemoveChild(IVirtualFileSystemNode)Removes a child node from the current directory.
ToString()Returns a string that represents the path of the directory.