S&box Wiki

Sandbox.BaseFileSystem

Sandbox.BaseFileSystem

Fields

Properties

bool IsValid { get; }

Methods

void CreateDirectory( string folder )
Create a directory - or a tree of directories. Returns silently if the directory already exists.
Sandbox.BaseFileSystem CreateSubSystem( string path )
Create a sub-filesystem at the specified path
void DeleteDirectory( string folder, bool recursive = False )
Delete a folder and optionally all of its contents
void DeleteFile( string path )
Delete a file
bool DirectoryExists( string path )
Returns true if the directory exists on this filesystem
int DirectorySize( string path, bool recursive = False )
Gets the size in bytes of all the files in a directory
bool FileExists( string path )
Returns true if the file exists on this filesystem
System.Int64 FileSize( string filename )
IEnumerable<string> FindDirectory( string folder, string pattern = "*", bool recursive = False )
Get a list of directories
IEnumerable<string> FindFile( string folder, string pattern = "*", bool recursive = False )
Get a list of files
async Task<uint> GetCRC( string filename )
string GetFullPath( string path )
Returns the full physical path to a file or folder on disk, or null if it isn't on disk.
System.IO.Stream OpenRead( string path, System.IO.FileMode mode = Open )
Open a file for read. Will throw an exception if it doesn't exist.
System.IO.Stream OpenWrite( string path, System.IO.FileMode mode = Create )
Open a file for write. If the file exists we'll overwrite it (by default)
Span<byte> ReadAllBytes( string path )
Read the contents of path and return it as a string
async Task<byte[]> ReadAllBytesAsync( string path )
Read the contents of path and return it as a string
string ReadAllText( string path )
Read the contents of path and return it as a string
async Task<string> ReadAllTextAsync( string path )
Read the contents of path and return it as a string
T ReadJson( string filename )
T ReadJsonOrDefault( string filename, T returnOnError )
void WriteAllText( string path, string contents )
Write the contents to the path. The file will be over-written if the file exists
void WriteJson( string filename, T data )

Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 7
Generate Html 0
SaveChanges (1) 17
Render Body 0
Render Sidebar 1