mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[CBMFS] Implement full support for mounting, reading and extracting Commodore 1540/1541/1571/1581 filesystems.
This commit is contained in:
@@ -27,15 +27,27 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Aaru.CommonTypes.AaruMetadata;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
namespace Aaru.Filesystems;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Implements detection of the filesystem used in 8-bit Commodore microcomputers</summary>
|
||||
public sealed partial class CBM : IFilesystem
|
||||
public sealed partial class CBM : IReadOnlyFilesystem
|
||||
{
|
||||
#region IFilesystem Members
|
||||
byte[] _bam;
|
||||
Dictionary<string, CachedFile> _cache;
|
||||
bool _debug;
|
||||
byte[] _diskHeader;
|
||||
bool _mounted;
|
||||
byte[] _root;
|
||||
FileSystemInfo _statfs;
|
||||
|
||||
#region IReadOnlyFilesystem Members
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => Localization.CBM_Name;
|
||||
@@ -46,5 +58,41 @@ public sealed partial class CBM : IFilesystem
|
||||
/// <inheritdoc />
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber ListXAttr(string path, out List<string> xattrs)
|
||||
{
|
||||
xattrs = null;
|
||||
|
||||
return ErrorNumber.NotSupported;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber GetXattr(string path, string xattr, ref byte[] buf) => ErrorNumber.NotSupported;
|
||||
|
||||
/// <inheritdoc />
|
||||
public ErrorNumber ReadLink(string path, out string dest)
|
||||
{
|
||||
dest = null;
|
||||
|
||||
return ErrorNumber.NotSupported;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public FileSystem Metadata { get; private set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<(string name, Type type, string description)> SupportedOptions =>
|
||||
Array.Empty<(string name, Type type, string description)>();
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<string, string> Namespaces => null;
|
||||
|
||||
#endregion
|
||||
|
||||
static Dictionary<string, string> GetDefaultOptions() => new()
|
||||
{
|
||||
{
|
||||
"debug", false.ToString()
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user