BinaryFileNode.md

January 20, 2026 ยท View on GitHub

Atypical.VirtualFileSystem.Core

Atypical.VirtualFileSystem.Core

BinaryFileNode Class

Represents a binary file node in the virtual file system. Extends the standard file node to support binary content in addition to text.

public sealed record BinaryFileNode : Atypical.VirtualFileSystem.Core.FileNode, Atypical.VirtualFileSystem.Core.IBinaryFileNode, Atypical.VirtualFileSystem.Core.Contracts.IFileNode, Atypical.VirtualFileSystem.Core.Contracts.IVirtualFileSystemNode, System.IEquatable<Atypical.VirtualFileSystem.Core.BinaryFileNode>

Inheritance System.Object ๐Ÿก’ VFSNode ๐Ÿก’ FileNode ๐Ÿก’ BinaryFileNode

Implements IBinaryFileNode, IFileNode, IVirtualFileSystemNode, System.IEquatable<BinaryFileNode>

Constructors
BinaryFileNode(VFSFilePath, byte[])Initializes a new instance of the BinaryFileNode class with binary content.
BinaryFileNode(VFSFilePath, string)Initializes a new instance of the BinaryFileNode class.
Properties
BinaryContentGets or sets the binary content of the file.
IsBinaryGets a value indicating whether this file contains binary data.
SizeInBytesGets the size of the binary content in bytes.
Methods
Copy(VFSFilePath)Creates a copy of the current binary file node.
SetBinaryContent(byte[])Sets the content from binary data and updates the text representation.
SetContentFromBase64(string)Sets the content from a base64 encoded string.
SetTextContent(string)Sets the content from a text string and clears binary content.
ToBase64String()Gets the binary content as a base64 encoded string.
ToString()Returns a string representation of the binary file node.