Use c#11 features

This commit is contained in:
Kurt
2024-03-04 20:19:09 -06:00
parent 4ecb98d9d1
commit 4c16905249
313 changed files with 1871 additions and 2382 deletions

View File

@@ -8,21 +8,18 @@ namespace pkNX.Containers.VFS;
public delegate FileSystemPath PathTransformation(FileSystemPath arg);
public class RelativeFileSystem : IFileSystem
[method: MethodImpl(MethodImplOptions.AggressiveInlining)]
public class RelativeFileSystem(
IFileSystem fileSystem,
PathTransformation toAbsolutePath,
PathTransformation toRelativePath)
: IFileSystem
{
public IFileSystem FileSystem { get; }
public IFileSystem FileSystem { get; } = fileSystem;
public bool IsReadOnly => FileSystem.IsReadOnly;
public PathTransformation ToAbsolutePath { get; }
public PathTransformation ToRelativePath { get; }
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public RelativeFileSystem(IFileSystem fileSystem, PathTransformation toAbsolutePath, PathTransformation toRelativePath)
{
FileSystem = fileSystem;
ToAbsolutePath = toAbsolutePath;
ToRelativePath = toRelativePath;
}
public PathTransformation ToAbsolutePath { get; } = toAbsolutePath;
public PathTransformation ToRelativePath { get; } = toRelativePath;
public void Dispose()
{