2016-07-28 18:13:49 +01:00
|
|
|
// /***************************************************************************
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Filename : LisaFS.cs
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// Component : Apple Lisa filesystem plugin.
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Constructors and common variables for the Apple Lisa filesystem plugin.
|
|
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2017-05-19 20:28:49 +01:00
|
|
|
// Copyright © 2011-2017 Natalia Portillo
|
2016-07-28 18:13:49 +01:00
|
|
|
// ****************************************************************************/
|
2014-04-17 19:58:14 +00:00
|
|
|
|
2014-04-17 03:45:02 +00:00
|
|
|
using System;
|
|
|
|
|
|
2016-07-22 02:18:53 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using DiscImageChef.ImagePlugins;
|
|
|
|
|
|
2016-07-21 17:36:51 +01:00
|
|
|
namespace DiscImageChef.Filesystems.LisaFS
|
2014-04-17 03:45:02 +00:00
|
|
|
{
|
2016-07-28 22:25:26 +01:00
|
|
|
// All information by Natalia Portillo
|
|
|
|
|
// Variable names from Lisa API
|
2016-07-21 17:36:51 +01:00
|
|
|
partial class LisaFS : Filesystem
|
2014-04-17 03:45:02 +00:00
|
|
|
{
|
2016-07-22 02:18:53 +01:00
|
|
|
bool mounted;
|
|
|
|
|
bool debug;
|
|
|
|
|
readonly ImagePlugin device;
|
|
|
|
|
|
|
|
|
|
MDDF mddf;
|
2016-07-27 22:13:47 +01:00
|
|
|
ulong volumePrefix;
|
|
|
|
|
int devTagSize;
|
2016-07-28 03:41:57 +01:00
|
|
|
SRecord[] srecords;
|
2016-07-22 02:18:53 +01:00
|
|
|
|
|
|
|
|
#region Caches
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Caches Extents Files</summary>
|
2016-07-28 22:25:26 +01:00
|
|
|
Dictionary<short, ExtentFile> extentCache;
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Caches system files</summary>
|
2016-07-28 22:25:26 +01:00
|
|
|
Dictionary<short, byte[]> systemFileCache;
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Caches user files files</summary>
|
2016-07-28 22:25:26 +01:00
|
|
|
Dictionary<short, byte[]> fileCache;
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Caches catalogs</summary>
|
2016-07-31 01:53:47 +01:00
|
|
|
List<CatalogEntry> catalogCache;
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Caches file size</summary>
|
2016-07-28 22:25:26 +01:00
|
|
|
Dictionary<short, int> fileSizeCache;
|
2016-07-29 02:22:24 +01:00
|
|
|
/// <summary>Lists Extents Files already printed in debug mode to not repeat them</summary>
|
2016-07-28 22:25:26 +01:00
|
|
|
List<short> printedExtents;
|
2016-07-31 01:53:47 +01:00
|
|
|
/// <summary>Caches the creation times for subdirectories as to not have to traverse the Catalog File on each stat</summary>
|
|
|
|
|
Dictionary<short, DateTime> directoryDTCCache;
|
2016-07-22 02:18:53 +01:00
|
|
|
#endregion Caches
|
|
|
|
|
|
2015-10-05 20:04:05 +01:00
|
|
|
public LisaFS()
|
2014-04-17 03:45:02 +00:00
|
|
|
{
|
|
|
|
|
Name = "Apple Lisa File System";
|
|
|
|
|
PluginUUID = new Guid("7E6034D1-D823-4248-A54D-239742B28391");
|
|
|
|
|
}
|
2016-07-22 02:18:53 +01:00
|
|
|
|
2016-07-28 22:25:26 +01:00
|
|
|
public LisaFS(ImagePlugin imagePlugin, ulong partitionStart, ulong partitionEnd)
|
2016-07-22 02:18:53 +01:00
|
|
|
{
|
|
|
|
|
device = imagePlugin;
|
2016-07-27 13:33:41 +01:00
|
|
|
Name = "Apple Lisa File System";
|
|
|
|
|
PluginUUID = new Guid("7E6034D1-D823-4248-A54D-239742B28391");
|
2016-07-22 02:18:53 +01:00
|
|
|
}
|
2014-04-17 03:45:02 +00:00
|
|
|
}
|
|
|
|
|
}
|