2013-04-07 10:58:58 +01:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SharpCompress.Common.GZip
|
|
|
|
|
|
{
|
|
|
|
|
|
public class GZipVolume : Volume
|
|
|
|
|
|
{
|
2013-04-28 13:01:29 +01:00
|
|
|
|
#if !PORTABLE && !NETFX_CORE
|
2013-04-07 10:58:58 +01:00
|
|
|
|
private readonly FileInfo fileInfo;
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
public GZipVolume(Stream stream, Options options)
|
|
|
|
|
|
: base(stream, options)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-04-28 13:01:29 +01:00
|
|
|
|
#if !PORTABLE && !NETFX_CORE
|
2013-04-07 10:58:58 +01:00
|
|
|
|
public GZipVolume(FileInfo fileInfo, Options options)
|
|
|
|
|
|
: base(fileInfo.OpenRead(), options)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.fileInfo = fileInfo;
|
|
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
2013-04-28 13:01:29 +01:00
|
|
|
|
#if !PORTABLE && !NETFX_CORE
|
2013-04-07 10:58:58 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// File that backs this volume, if it not stream based
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public override FileInfo VolumeFile
|
|
|
|
|
|
{
|
2013-04-28 12:32:55 +01:00
|
|
|
|
get { return fileInfo; }
|
2013-04-07 10:58:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsFirstVolume
|
|
|
|
|
|
{
|
2013-04-28 12:32:55 +01:00
|
|
|
|
get { return true; }
|
2013-04-07 10:58:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsMultiVolume
|
|
|
|
|
|
{
|
2013-04-28 12:32:55 +01:00
|
|
|
|
get { return true; }
|
2013-04-07 10:58:58 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2013-04-28 12:32:55 +01:00
|
|
|
|
}
|