mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
🎨REFACTOR: Plugins do not need to expose their methods as virtual.
This commit is contained in:
@@ -56,10 +56,10 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
Vtoc vtoc;
|
||||
|
||||
FileSystemType xmlFsType;
|
||||
public virtual FileSystemType XmlFsType => xmlFsType;
|
||||
public virtual Encoding Encoding => currentEncoding;
|
||||
public virtual string Name => "Apple DOS File System";
|
||||
public virtual Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
|
||||
public FileSystemType XmlFsType => xmlFsType;
|
||||
public Encoding Encoding => currentEncoding;
|
||||
public string Name => "Apple DOS File System";
|
||||
public Guid Id => new Guid("8658A1E9-B2E7-4BCC-9638-157A31B0A700\n");
|
||||
|
||||
#region Caches
|
||||
/// <summary>Caches track/sector lists</summary>
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// </summary>
|
||||
/// <param name="path">Link path.</param>
|
||||
/// <param name="dest">Link destination.</param>
|
||||
public virtual Errno ReadLink(string path, ref string dest)
|
||||
public Errno ReadLink(string path, ref string dest)
|
||||
{
|
||||
return !mounted ? Errno.AccessDenied : Errno.NotSupported;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// </summary>
|
||||
/// <param name="path">Directory path.</param>
|
||||
/// <param name="contents">Directory contents.</param>
|
||||
public virtual Errno ReadDir(string path, ref List<string> contents)
|
||||
public Errno ReadDir(string path, ref List<string> contents)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
{
|
||||
public partial class AppleDOS
|
||||
{
|
||||
public virtual Errno GetAttributes(string path, ref FileAttributes attributes)
|
||||
public Errno GetAttributes(string path, ref FileAttributes attributes)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
public virtual Errno Read(string path, long offset, long size, ref byte[] buf)
|
||||
public Errno Read(string path, long offset, long size, ref byte[] buf)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
public virtual Errno Stat(string path, ref FileEntryInfo stat)
|
||||
public Errno Stat(string path, ref FileEntryInfo stat)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
public virtual Errno MapBlock(string path, long fileBlock, ref long deviceBlock)
|
||||
public Errno MapBlock(string path, long fileBlock, ref long deviceBlock)
|
||||
{
|
||||
// TODO: Not really important.
|
||||
return !mounted ? Errno.AccessDenied : Errno.NotImplemented;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
{
|
||||
public partial class AppleDOS
|
||||
{
|
||||
public virtual bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
public bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||
{
|
||||
if(imagePlugin.Info.Sectors != 455 && imagePlugin.Info.Sectors != 560) return false;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
vtoc.sectorsPerTrack == spt && vtoc.bytesPerSector == 256;
|
||||
}
|
||||
|
||||
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
||||
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
||||
{
|
||||
// TODO: Until Apple ][ encoding is implemented
|
||||
currentEncoding = new LisaRoman();
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// <summary>
|
||||
/// Mounts an Apple DOS filesystem
|
||||
/// </summary>
|
||||
public virtual Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug)
|
||||
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, bool debug)
|
||||
{
|
||||
device = imagePlugin;
|
||||
start = partition.Start;
|
||||
@@ -120,7 +120,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// <summary>
|
||||
/// Umounts this DOS filesystem
|
||||
/// </summary>
|
||||
public virtual Errno Unmount()
|
||||
public Errno Unmount()
|
||||
{
|
||||
mounted = false;
|
||||
extentCache = null;
|
||||
@@ -135,7 +135,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// Gets information about the mounted volume.
|
||||
/// </summary>
|
||||
/// <param name="stat">Information about the mounted volume.</param>
|
||||
public virtual Errno StatFs(ref FileSystemInfo stat)
|
||||
public Errno StatFs(ref FileSystemInfo stat)
|
||||
{
|
||||
stat = new FileSystemInfo
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">Path.</param>
|
||||
/// <param name="xattrs">List of extended attributes, alternate data streams and forks.</param>
|
||||
public virtual Errno ListXAttr(string path, ref List<string> xattrs)
|
||||
public Errno ListXAttr(string path, ref List<string> xattrs)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="xattr">Extended attribute, alternate data stream or fork name.</param>
|
||||
/// <param name="buf">Buffer.</param>
|
||||
public virtual Errno GetXattr(string path, string xattr, ref byte[] buf)
|
||||
public Errno GetXattr(string path, string xattr, ref byte[] buf)
|
||||
{
|
||||
if(!mounted) return Errno.AccessDenied;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user