mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
30 lines
649 B
C#
30 lines
649 B
C#
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// A directory on a disk
|
|
/// </summary>
|
|
internal class LocalFileSystem : BaseFileSystem
|
|
{
|
|
Zio.FileSystems.PhysicalFileSystem Physical { get; }
|
|
|
|
internal LocalFileSystem( string rootFolder, bool makereadonly = false )
|
|
{
|
|
Physical = new Zio.FileSystems.PhysicalFileSystem();
|
|
|
|
var rootPath = Physical.ConvertPathFromInternal( rootFolder.ToLowerInvariant() );
|
|
system = new Zio.FileSystems.SubFileSystem( Physical, rootPath );
|
|
|
|
if ( makereadonly )
|
|
{
|
|
system = new Zio.FileSystems.ReadOnlyFileSystem( system );
|
|
}
|
|
}
|
|
|
|
internal override void Dispose()
|
|
{
|
|
base.Dispose();
|
|
|
|
Physical?.Dispose();
|
|
}
|
|
}
|