class BaseFileSystem

book_4_sparkGenerated
code_blocksInput

Description

The BaseFileSystem class in the Sandbox namespace represents a versatile filesystem. It can be implemented as a disk-based, in-memory, or cloud-based system. Additionally, it can be configured as writable or read-only, or even as a combination of these, providing a merged, read-only view.

Members

Instance Members

Member NameSummary
FindDirectoryFinds directories matching a specified pattern within a folder, optionally searching recursively.
FindFileFinds files matching a specified pattern within a folder, optionally searching recursively.
DeleteDirectoryDeletes a directory, with an option to delete recursively.
DeleteFileDeletes a specified file.
CreateDirectoryCreates a new directory at the specified path.
FileExistsChecks if a file exists at the specified path.
DirectoryExistsChecks if a directory exists at the specified path.
GetFullPathReturns the full path for a given path.
WriteAllTextWrites text to a file at the specified path.
ReadAllTextReads all text from a file at the specified path.
ReadAllBytesReads all bytes from a file at the specified path.
ReadAllBytesAsyncAsynchronously reads all bytes from a file at the specified path.
ReadAllTextAsyncAsynchronously reads all text from a file at the specified path.
CreateSubSystemCreates a sub-system of the filesystem at the specified path.
OpenWriteOpens a file stream for writing at the specified path.
OpenReadOpens a file stream for reading at the specified path.
ReadJsonReads a JSON file and deserializes it to a specified type.
ReadJsonOrDefaultReads a JSON file and deserializes it to a specified type, returning a default value on error.
WriteJsonSerializes an object to JSON and writes it to a file.
DirectorySizeCalculates the size of a directory, optionally including subdirectories.
GetCrcAsyncAsynchronously calculates the CRC of a file.
GetCrcCalculates the CRC of a file.
FileSizeGets the size of a file.

Properties

Property NameSummary
IsValidIndicates whether the filesystem is valid.