REFACTOR: Final cleanup of DiscImageChef.Filesystems.

This commit is contained in:
2017-12-24 02:37:41 +00:00
parent ec73a6cdc3
commit 4115698ac8
94 changed files with 5196 additions and 5116 deletions

View File

@@ -91,8 +91,8 @@ namespace DiscImageChef.Filesystems.AppleMFS
entry.flMdDat = BigEndianBitConverter.ToUInt32(directoryBlocks, offset + 46);
entry.flNam = new byte[directoryBlocks[offset + 50] + 1];
Array.Copy(directoryBlocks, offset + 50, entry.flNam, 0, entry.flNam.Length);
string lowerFilename = StringHandlers.PascalToString(entry.flNam, CurrentEncoding).ToLowerInvariant()
.Replace('/', ':');
string lowerFilename = StringHandlers
.PascalToString(entry.flNam, CurrentEncoding).ToLowerInvariant().Replace('/', ':');
if(entry.flFlags.HasFlag(MFS_FileFlags.Used) && !idToFilename.ContainsKey(entry.flFlNum) &&
!idToEntry.ContainsKey(entry.flFlNum) && !filenameToId.ContainsKey(lowerFilename) &&

View File

@@ -169,8 +169,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0)
{
stat.Blocks = directoryBlocks.Length / stat.BlockSize +
directoryBlocks.Length % stat.BlockSize;
stat.Blocks = directoryBlocks.Length / stat.BlockSize + directoryBlocks.Length % stat.BlockSize;
stat.Length = directoryBlocks.Length;
}
else if(string.Compare(path, "$Bitmap", StringComparison.InvariantCulture) == 0)

View File

@@ -56,8 +56,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
return drSigWord == MFS_MAGIC;
}
public override void GetInformation(ImagePlugin imagePlugin, Partition partition,
out string information)
public override void GetInformation(ImagePlugin imagePlugin, Partition partition, out string information)
{
information = "";

View File

@@ -32,6 +32,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable 169
namespace DiscImageChef.Filesystems.AppleMFS
@@ -42,7 +43,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
public partial class AppleMFS
{
/// <summary>
/// Master Directory Block, should be at offset 0x0400 bytes in volume
/// Master Directory Block, should be at offset 0x0400 bytes in volume
/// </summary>
struct MFS_MasterDirectoryBlock
{
@@ -79,7 +80,7 @@ namespace DiscImageChef.Filesystems.AppleMFS
}
/// <summary>
/// Should be at offset 0x0000 in volume, followed by boot code
/// Should be at offset 0x0000 in volume, followed by boot code
/// </summary>
struct MFS_BootBlock
{

View File

@@ -74,8 +74,8 @@ namespace DiscImageChef.Filesystems.AppleMFS
if(!ArrayHelpers.ArrayIsNullOrEmpty(entry.flUsrWds)) xattrs.Add("com.apple.FinderInfo");
if(debug && device.ImageInfo.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag) &&
entry.flLgLen > 0) xattrs.Add("com.apple.macintosh.tags");
if(debug && device.ImageInfo.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag) && entry.flLgLen > 0)
xattrs.Add("com.apple.macintosh.tags");
xattrs.Sort();