Make Encoding a private field only for IReadOnlyFilesystem implementors.

This commit is contained in:
2022-12-17 23:17:18 +00:00
parent dc26b85c2f
commit 24069676e2
147 changed files with 296 additions and 497 deletions

View File

@@ -27,7 +27,6 @@
// ****************************************************************************/
using System;
using System.Text;
using Aaru.CommonTypes.Interfaces;
namespace Aaru.Filesystems;
@@ -36,8 +35,6 @@ namespace Aaru.Filesystems;
/// <summary>Implements detection for the Plan-9 Fossil on-disk filesystem</summary>
public sealed partial class Fossil : IFilesystem
{
/// <inheritdoc />
public Encoding Encoding { get; private set; }
/// <inheritdoc />
public string Name => Localization.Fossil_Name;
/// <inheritdoc />

View File

@@ -65,7 +65,7 @@ public sealed partial class Fossil
out FileSystem metadata)
{
// Technically everything on Plan 9 from Bell Labs is in UTF-8
Encoding = Encoding.UTF8;
encoding = Encoding.UTF8;
information = "";
metadata = new FileSystem();
@@ -117,8 +117,8 @@ public sealed partial class Fossil
sb.AppendFormat(Localization.Active_root_block_0, fsb.active).AppendLine();
sb.AppendFormat(Localization.Next_root_block_0, fsb.next).AppendLine();
sb.AppendFormat(Localization.Current_root_block_0, fsb.current).AppendLine();
sb.AppendFormat(Localization.Volume_label_0, StringHandlers.CToString(fsb.name, Encoding)).AppendLine();
metadata.VolumeName = StringHandlers.CToString(fsb.name, Encoding);
sb.AppendFormat(Localization.Volume_label_0, StringHandlers.CToString(fsb.name, encoding)).AppendLine();
metadata.VolumeName = StringHandlers.CToString(fsb.name, encoding);
}
}