Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 4.29 KB

File metadata and controls

35 lines (27 loc) · 4.29 KB

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
BinaryContent Gets or sets the binary content of the file.
IsBinary Gets a value indicating whether this file contains binary data.
SizeInBytes Gets 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.