Add "Author" field to plugins.

This commit is contained in:
2018-08-29 22:15:43 +01:00
parent bb359d88d3
commit abfc476e01
155 changed files with 937 additions and 980 deletions

View File

@@ -47,18 +47,30 @@ namespace DiscImageChef.Filters
const uint AppleDoubleVersion = 0x00010000;
const uint AppleDoubleVersion2 = 0x00020000;
readonly byte[] DOSHome =
{0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] MacintoshHome =
{0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] OSXHome =
{0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] ProDOSHome =
{0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] UNIXHome =
{0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] VMXHome =
{0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
string basePath;
DateTime creationTime;
@@ -69,63 +81,34 @@ namespace DiscImageChef.Filters
bool opened;
AppleDoubleEntry rsrcFork;
public string Name => "AppleDouble";
public Guid Id => new Guid("1B2165EE-C9DF-4B21-BBBB-9E5892B2DF4D");
public string Name => "AppleDouble";
public Guid Id => new Guid("1B2165EE-C9DF-4B21-BBBB-9E5892B2DF4D");
public string Author => "Natalia Portillo";
public void Close()
{
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return dataFork.length;
}
public long GetDataForkLength() => dataFork.length;
public Stream GetDataForkStream()
{
return new FileStream(basePath, FileMode.Open, FileAccess.Read);
}
public Stream GetDataForkStream() => new FileStream(basePath, FileMode.Open, FileAccess.Read);
public string GetFilename()
{
return Path.GetFileName(basePath);
}
public string GetFilename() => Path.GetFileName(basePath);
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return dataFork.length + rsrcFork.length;
}
public long GetLength() => dataFork.length + rsrcFork.length;
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public long GetResourceForkLength()
{
return rsrcFork.length;
}
public long GetResourceForkLength() => rsrcFork.length;
public Stream GetResourceForkStream()
{
@@ -135,22 +118,11 @@ namespace DiscImageChef.Filters
rsrcFork.offset + rsrcFork.length - 1);
}
public bool HasResourceFork()
{
return rsrcFork.length > 0;
}
public bool HasResourceFork() => rsrcFork.length > 0;
public bool Identify(byte[] buffer)
{
// Now way to have two files in a single byte array
return false;
}
public bool Identify(byte[] buffer) => false;
public bool Identify(Stream stream)
{
// Now way to have two files in a single stream
return false;
}
public bool Identify(Stream stream) => false;
public bool Identify(string path)
{
@@ -296,10 +268,7 @@ namespace DiscImageChef.Filters
(header.version == AppleDoubleVersion || header.version == AppleDoubleVersion2);
}
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
public void Open(byte[] buffer)
{

View File

@@ -47,18 +47,30 @@ namespace DiscImageChef.Filters
const uint AppleSingleVersion = 0x00010000;
const uint AppleSingleVersion2 = 0x00020000;
readonly byte[] DOSHome =
{0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x53, 0x2D, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] MacintoshHome =
{0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x61, 0x63, 0x69, 0x6E, 0x74, 0x6F, 0x73, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] OSXHome =
{0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x4D, 0x61, 0x63, 0x20, 0x4F, 0x53, 0x20, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] ProDOSHome =
{0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x50, 0x72, 0x6F, 0x44, 0x4F, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] UNIXHome =
{0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x55, 0x6E, 0x69, 0x78, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
readonly byte[] VMSHome =
{0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
{
0x56, 0x41, 0x58, 0x20, 0x56, 0x4D, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
string basePath;
byte[] bytes;
DateTime creationTime;
@@ -70,8 +82,9 @@ namespace DiscImageChef.Filters
AppleSingleEntry rsrcFork;
Stream stream;
public string Name => "AppleSingle";
public Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05");
public string Name => "AppleSingle";
public Guid Id => new Guid("A69B20E8-F4D3-42BB-BD2B-4A7263394A05");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -83,20 +96,11 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return dataFork.length;
}
public long GetDataForkLength() => dataFork.length;
public Stream GetDataForkStream()
{
@@ -111,35 +115,17 @@ namespace DiscImageChef.Filters
return null;
}
public string GetFilename()
{
return Path.GetFileName(basePath);
}
public string GetFilename() => Path.GetFileName(basePath);
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return dataFork.length + rsrcFork.length;
}
public long GetLength() => dataFork.length + rsrcFork.length;
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public long GetResourceForkLength()
{
return rsrcFork.length;
}
public long GetResourceForkLength() => rsrcFork.length;
public Stream GetResourceForkStream()
{
@@ -154,10 +140,7 @@ namespace DiscImageChef.Filters
return null;
}
public bool HasResourceFork()
{
return rsrcFork.length > 0;
}
public bool HasResourceFork() => rsrcFork.length > 0;
public bool Identify(byte[] buffer)
{
@@ -198,10 +181,7 @@ namespace DiscImageChef.Filters
(header.version == AppleSingleVersion || header.version == AppleSingleVersion2);
}
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
public void Open(byte[] buffer)
{

View File

@@ -51,8 +51,9 @@ namespace DiscImageChef.Filters
DateTime lastWriteTime;
bool opened;
public string Name => "BZip2";
public Guid Id => new Guid("FCCFB0C3-32EF-40D8-9714-2333F6AC72A9");
public string Name => "BZip2";
public Guid Id => new Guid("FCCFB0C3-32EF-40D8-9714-2333F6AC72A9");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -62,30 +63,15 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public Stream GetDataForkStream()
{
return innerStream;
}
public Stream GetDataForkStream() => innerStream;
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public Stream GetResourceForkStream()
{
return null;
}
public Stream GetResourceForkStream() => null;
public bool HasResourceFork()
{
return false;
}
public bool HasResourceFork() => false;
public bool Identify(byte[] buffer)
{
@@ -176,30 +162,15 @@ namespace DiscImageChef.Filters
opened = true;
}
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return decompressedSize;
}
public long GetDataForkLength() => decompressedSize;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return decompressedSize;
}
public long GetLength() => decompressedSize;
public long GetResourceForkLength()
{
return 0;
}
public long GetResourceForkLength() => 0;
public string GetFilename()
{
@@ -211,14 +182,8 @@ namespace DiscImageChef.Filters
: basePath;
}
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
}
}

View File

@@ -50,8 +50,9 @@ namespace DiscImageChef.Filters
bool opened;
Stream zStream;
public string Name => "GZip";
public Guid Id => new Guid("F4996661-4A29-42C9-A2C7-3904EF40F3B0");
public string Name => "GZip";
public Guid Id => new Guid("F4996661-4A29-42C9-A2C7-3904EF40F3B0");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -61,35 +62,17 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public Stream GetDataForkStream()
{
return zStream;
}
public Stream GetDataForkStream() => zStream;
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public Stream GetResourceForkStream()
{
return null;
}
public Stream GetResourceForkStream() => null;
public bool HasResourceFork()
{
return false;
}
public bool HasResourceFork() => false;
public bool Identify(byte[] buffer)
{
return buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08;
}
public bool Identify(byte[] buffer) => buffer[0] == 0x1F && buffer[1] == 0x8B && buffer[2] == 0x08;
public bool Identify(Stream stream)
{
@@ -191,30 +174,15 @@ namespace DiscImageChef.Filters
opened = true;
}
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return decompressedSize;
}
public long GetDataForkLength() => decompressedSize;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return decompressedSize;
}
public long GetLength() => decompressedSize;
public long GetResourceForkLength()
{
return 0;
}
public long GetResourceForkLength() => 0;
public string GetFilename()
{
@@ -226,14 +194,8 @@ namespace DiscImageChef.Filters
: basePath;
}
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
}
}

View File

@@ -51,8 +51,9 @@ namespace DiscImageChef.Filters
DateTime lastWriteTime;
bool opened;
public string Name => "LZip";
public Guid Id => new Guid("09D715E9-20C0-48B1-A8D9-D8897CEC57C9");
public string Name => "LZip";
public Guid Id => new Guid("09D715E9-20C0-48B1-A8D9-D8897CEC57C9");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -62,36 +63,18 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public Stream GetDataForkStream()
{
return innerStream;
}
public Stream GetDataForkStream() => innerStream;
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public Stream GetResourceForkStream()
{
return null;
}
public Stream GetResourceForkStream() => null;
public bool HasResourceFork()
{
return false;
}
public bool HasResourceFork() => false;
public bool Identify(byte[] buffer)
{
return buffer[0] == 0x4C && buffer[1] == 0x5A && buffer[2] == 0x49 && buffer[3] == 0x50 &&
buffer[4] == 0x01;
}
public bool Identify(byte[] buffer) =>
buffer[0] == 0x4C && buffer[1] == 0x5A && buffer[2] == 0x49 && buffer[3] == 0x50 && buffer[4] == 0x01;
public bool Identify(Stream stream)
{
@@ -166,30 +149,15 @@ namespace DiscImageChef.Filters
opened = true;
}
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return decompressedSize;
}
public long GetDataForkLength() => decompressedSize;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return decompressedSize;
}
public long GetLength() => decompressedSize;
public long GetResourceForkLength()
{
return 0;
}
public long GetResourceForkLength() => 0;
public string GetFilename()
{
@@ -201,14 +169,8 @@ namespace DiscImageChef.Filters
: basePath;
}
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
}
}

View File

@@ -57,8 +57,9 @@ namespace DiscImageChef.Filters
long rsrcForkOff;
Stream stream;
public string Name => "MacBinary";
public Guid Id => new Guid("D7C321D3-E51F-45DF-A150-F6BFDF0D7704");
public string Name => "MacBinary";
public Guid Id => new Guid("D7C321D3-E51F-45DF-A150-F6BFDF0D7704");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -70,20 +71,11 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return header.dataLength;
}
public long GetDataForkLength() => header.dataLength;
public Stream GetDataForkStream()
{
@@ -98,35 +90,17 @@ namespace DiscImageChef.Filters
return null;
}
public string GetFilename()
{
return filename;
}
public string GetFilename() => filename;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return header.dataLength + header.resourceLength;
}
public long GetLength() => header.dataLength + header.resourceLength;
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public long GetResourceForkLength()
{
return header.resourceLength;
}
public long GetResourceForkLength() => header.resourceLength;
public Stream GetResourceForkStream()
{
@@ -141,10 +115,7 @@ namespace DiscImageChef.Filters
return null;
}
public bool HasResourceFork()
{
return header.resourceLength > 0;
}
public bool HasResourceFork() => header.resourceLength > 0;
public bool Identify(byte[] buffer)
{
@@ -191,10 +162,7 @@ namespace DiscImageChef.Filters
(header.dataLength > 0 || header.resourceLength > 0);
}
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
public void Open(byte[] buffer)
{

View File

@@ -58,83 +58,42 @@ namespace DiscImageChef.Filters
long rsrcLen;
string rsrcPath;
public string Name => "PCExchange";
public Guid Id => new Guid("9264EB9F-D634-4F9B-BE12-C24CD44988C6");
public string Name => "PCExchange";
public Guid Id => new Guid("9264EB9F-D634-4F9B-BE12-C24CD44988C6");
public string Author => "Natalia Portillo";
public void Close()
{
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return dataLen;
}
public long GetDataForkLength() => dataLen;
public Stream GetDataForkStream()
{
return new FileStream(dataPath, FileMode.Open, FileAccess.Read);
}
public Stream GetDataForkStream() => new FileStream(dataPath, FileMode.Open, FileAccess.Read);
public string GetFilename()
{
return Path.GetFileName(basePath);
}
public string GetFilename() => Path.GetFileName(basePath);
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return dataLen + rsrcLen;
}
public long GetLength() => dataLen + rsrcLen;
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public long GetResourceForkLength()
{
return rsrcLen;
}
public long GetResourceForkLength() => rsrcLen;
public Stream GetResourceForkStream()
{
return new FileStream(rsrcPath, FileMode.Open, FileAccess.Read);
}
public Stream GetResourceForkStream() => new FileStream(rsrcPath, FileMode.Open, FileAccess.Read);
public bool HasResourceFork()
{
return rsrcPath != null;
}
public bool HasResourceFork() => rsrcPath != null;
public bool Identify(byte[] buffer)
{
return false;
}
public bool Identify(byte[] buffer) => false;
public bool Identify(Stream stream)
{
return false;
}
public bool Identify(Stream stream) => false;
public bool Identify(string path)
{
@@ -188,10 +147,7 @@ namespace DiscImageChef.Filters
return dataFound && rsrcFound;
}
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
public void Open(byte[] buffer)
{

View File

@@ -50,8 +50,9 @@ namespace DiscImageChef.Filters
DateTime lastWriteTime;
bool opened;
public string Name => "XZ";
public Guid Id => new Guid("666A8617-0444-4C05-9F4F-DF0FD758D0D2");
public string Name => "XZ";
public Guid Id => new Guid("666A8617-0444-4C05-9F4F-DF0FD758D0D2");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -61,37 +62,20 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public Stream GetDataForkStream()
{
return innerStream;
}
public Stream GetDataForkStream() => innerStream;
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public Stream GetResourceForkStream()
{
return null;
}
public Stream GetResourceForkStream() => null;
public bool HasResourceFork()
{
return false;
}
public bool HasResourceFork() => false;
public bool Identify(byte[] buffer)
{
return buffer[0] == 0xFD && buffer[1] == 0x37 && buffer[2] == 0x7A && buffer[3] == 0x58 &&
buffer[4] == 0x5A && buffer[5] == 0x00 && buffer[buffer.Length - 2] == 0x59 &&
buffer[buffer.Length - 1] == 0x5A;
}
public bool Identify(byte[] buffer) =>
buffer[0] == 0xFD && buffer[1] == 0x37 && buffer[2] == 0x7A &&
buffer[3] == 0x58 && buffer[4] == 0x5A &&
buffer[5] == 0x00 && buffer[buffer.Length - 2] == 0x59 && buffer[buffer.Length - 1] == 0x5A;
public bool Identify(Stream stream)
{
@@ -162,30 +146,15 @@ namespace DiscImageChef.Filters
opened = true;
}
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return decompressedSize;
}
public long GetDataForkLength() => decompressedSize;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return decompressedSize;
}
public long GetLength() => decompressedSize;
public long GetResourceForkLength()
{
return 0;
}
public long GetResourceForkLength() => 0;
public string GetFilename()
{
@@ -197,15 +166,9 @@ namespace DiscImageChef.Filters
: basePath;
}
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
void GuessSize()
{

View File

@@ -47,8 +47,9 @@ namespace DiscImageChef.Filters
DateTime lastWriteTime;
bool opened;
public string Name => "No filter";
public Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000");
public string Name => "No filter";
public Guid Id => new Guid("12345678-AAAA-BBBB-CCCC-123456789000");
public string Author => "Natalia Portillo";
public void Close()
{
@@ -58,46 +59,21 @@ namespace DiscImageChef.Filters
opened = false;
}
public string GetBasePath()
{
return basePath;
}
public string GetBasePath() => basePath;
public Stream GetDataForkStream()
{
return dataStream;
}
public Stream GetDataForkStream() => dataStream;
public string GetPath()
{
return basePath;
}
public string GetPath() => basePath;
public Stream GetResourceForkStream()
{
return null;
}
public Stream GetResourceForkStream() => null;
public bool HasResourceFork()
{
// TODO: Implement support for xattrs/ADS
return false;
}
public bool HasResourceFork() => false;
public bool Identify(byte[] buffer)
{
return buffer != null && buffer.Length > 0;
}
public bool Identify(byte[] buffer) => buffer != null && buffer.Length > 0;
public bool Identify(Stream stream)
{
return stream != null && stream.Length > 0;
}
public bool Identify(Stream stream) => stream != null && stream.Length > 0;
public bool Identify(string path)
{
return File.Exists(path);
}
public bool Identify(string path) => File.Exists(path);
public void Open(byte[] buffer)
{
@@ -127,44 +103,20 @@ namespace DiscImageChef.Filters
opened = true;
}
public DateTime GetCreationTime()
{
return creationTime;
}
public DateTime GetCreationTime() => creationTime;
public long GetDataForkLength()
{
return dataStream.Length;
}
public long GetDataForkLength() => dataStream.Length;
public DateTime GetLastWriteTime()
{
return lastWriteTime;
}
public DateTime GetLastWriteTime() => lastWriteTime;
public long GetLength()
{
return dataStream.Length;
}
public long GetLength() => dataStream.Length;
public long GetResourceForkLength()
{
return 0;
}
public long GetResourceForkLength() => 0;
public string GetFilename()
{
return Path.GetFileName(basePath);
}
public string GetFilename() => Path.GetFileName(basePath);
public string GetParentFolder()
{
return Path.GetDirectoryName(basePath);
}
public string GetParentFolder() => Path.GetDirectoryName(basePath);
public bool IsOpened()
{
return opened;
}
public bool IsOpened() => opened;
}
}