22 m_Data = Array.Empty<
byte>();
40 BadLogger.
Log($
"Opening File(READ) {AbsolutePath}",
"BFS");
42 return new MemoryStream(
m_Data,
false);
52 BadLogger.
Log($
"Opening File(WRITE: {mode}) {AbsolutePath}",
"BFS");
57 m_Data = Array.Empty<
byte>();
62 s.OnDispose += () =>
m_Data = s.ToArray();
Public facing interface for a logger.
static void Log(string message)
Writes a Log to the Message Handler.
Represents a Virtual File System Directory Entry.
string AbsolutePath
The Absolute Path of this Directory.
Implements a Virtual File System File.
override IEnumerable< BadVirtualNode > Children
byte[] m_Data
The File Data.
Stream OpenWrite(BadWriteMode mode)
Returns a writable stream for the file.
BadVirtualFile(string name, BadVirtualDirectory? parent)
Creates a new Virtual File.
override bool HasChildren
string AbsolutePath
The Absolute Path of the File.
Stream OpenRead()
Returns a readable stream for the file.
Implements a special memory stream that can be used to read and write to a virtual file.
Base class for all Virtual Filesystem Nodes.
BadVirtualDirectory? Parent
Parent Directory.
Contains Logging system for the BadScript Runtime.
Contains the Implementation of the BadScript Virtual File System.
BadWriteMode
The Write Modes of the File System Abstraction.