using System; using System.Diagnostics.CodeAnalysis; using System.IO; using System.IO.Abstractions; namespace Quadarax.Foundation.Core.IO.FileSystem.Memory { public class MemoryPath : IPath { private readonly MemoryFileSystem _fileSystem; private readonly string _tempPath; public char DirectorySeparatorChar => Path.DirectorySeparatorChar; public char AltDirectorySeparatorChar => Path.AltDirectorySeparatorChar; public char PathSeparator => throw new NotImplementedException(); public char VolumeSeparatorChar => throw new NotImplementedException(); public IFileSystem FileSystem => _fileSystem; public MemoryPath(MemoryFileSystem fileSystem) { _fileSystem = fileSystem; _tempPath = System.IO.Path.GetTempPath(); // Use the real system's temp path } [return: NotNullIfNotNull("path")] public string? ChangeExtension(string? path, string? extension) { throw new NotImplementedException(); } public string Combine(string path1, string path2) { return Path.Combine(path1, path2); } public string Combine(string path1, string path2, string path3) { throw new NotImplementedException(); } public string Combine(string path1, string path2, string path3, string path4) { throw new NotImplementedException(); } public string Combine(params string[] paths) { throw new NotImplementedException(); } public bool EndsInDirectorySeparator(ReadOnlySpan path) { throw new NotImplementedException(); } public bool EndsInDirectorySeparator(string path) { throw new NotImplementedException(); } public bool Exists([NotNullWhen(true)] string? path) { throw new NotImplementedException(); } public string? GetDirectoryName(string? path) { return Path.GetDirectoryName(path); } public ReadOnlySpan GetDirectoryName(ReadOnlySpan path) { throw new NotImplementedException(); } public ReadOnlySpan GetExtension(ReadOnlySpan path) { throw new NotImplementedException(); } [return: NotNullIfNotNull("path")] public string? GetExtension(string? path) { throw new NotImplementedException(); } public string? GetFileName(string? path) { return Path.GetFileName(path); } public ReadOnlySpan GetFileName(ReadOnlySpan path) { throw new NotImplementedException(); } public ReadOnlySpan GetFileNameWithoutExtension(ReadOnlySpan path) { throw new NotImplementedException(); } [return: NotNullIfNotNull("path")] public string? GetFileNameWithoutExtension(string? path) { throw new NotImplementedException(); } public string GetFullPath(string path) { throw new NotImplementedException(); } public string GetFullPath(string path, string basePath) { throw new NotImplementedException(); } public char[] GetInvalidFileNameChars() { throw new NotImplementedException(); } public char[] GetInvalidPathChars() { throw new NotImplementedException(); } public ReadOnlySpan GetPathRoot(ReadOnlySpan path) { throw new NotImplementedException(); } public string? GetPathRoot(string? path) { throw new NotImplementedException(); } public string GetRandomFileName() { throw new NotImplementedException(); } public string GetRelativePath(string relativeTo, string path) { throw new NotImplementedException(); } public string GetTempFileName() { throw new NotImplementedException(); } public string GetTempPath() { return _tempPath; } public bool HasExtension(ReadOnlySpan path) { throw new NotImplementedException(); } public bool HasExtension([NotNullWhen(true)] string? path) { throw new NotImplementedException(); } public bool IsPathFullyQualified(ReadOnlySpan path) { throw new NotImplementedException(); } public bool IsPathFullyQualified(string path) { throw new NotImplementedException(); } public bool IsPathRooted(ReadOnlySpan path) { throw new NotImplementedException(); } public bool IsPathRooted([NotNullWhen(true)] string? path) { throw new NotImplementedException(); } public string Join(ReadOnlySpan path1, ReadOnlySpan path2) { throw new NotImplementedException(); } public string Join(ReadOnlySpan path1, ReadOnlySpan path2, ReadOnlySpan path3) { throw new NotImplementedException(); } public string Join(string? path1, string? path2) { throw new NotImplementedException(); } public string Join(string? path1, string? path2, string? path3) { throw new NotImplementedException(); } public string Join(params string?[] paths) { throw new NotImplementedException(); } public string Join(ReadOnlySpan path1, ReadOnlySpan path2, ReadOnlySpan path3, ReadOnlySpan path4) { throw new NotImplementedException(); } public string Join(string? path1, string? path2, string? path3, string? path4) { throw new NotImplementedException(); } public ReadOnlySpan TrimEndingDirectorySeparator(ReadOnlySpan path) { throw new NotImplementedException(); } public string TrimEndingDirectorySeparator(string path) { throw new NotImplementedException(); } public bool TryJoin(ReadOnlySpan path1, ReadOnlySpan path2, Span destination, out int charsWritten) { throw new NotImplementedException(); } public bool TryJoin(ReadOnlySpan path1, ReadOnlySpan path2, ReadOnlySpan path3, Span destination, out int charsWritten) { throw new NotImplementedException(); } // Implement other methods as needed } }