add method to create fileset file
This commit is contained in:
@@ -6,10 +6,10 @@ namespace Duplicati.Library.Main.Volumes
|
||||
{
|
||||
public abstract class VolumeBase
|
||||
{
|
||||
protected class FilesetData
|
||||
public class FilesetData
|
||||
{
|
||||
[JsonProperty("IsFullBackup")]
|
||||
public bool? IsFullBackup { get; set; }
|
||||
public bool IsFullBackup { get; set; } = true;
|
||||
|
||||
public static string GetFilesetInstance(bool isFullBackup = true)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Duplicati.Library.Interface;
|
||||
using Duplicati.Library.Utility;
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Duplicati.Library.Interface;
|
||||
|
||||
namespace Duplicati.Library.Main.Volumes
|
||||
{
|
||||
@@ -63,15 +62,23 @@ namespace Duplicati.Library.Main.Volumes
|
||||
if ((this is IndexVolumeWriter || this is FilesetVolumeWriter) && m_compression is Library.Interface.ICompressionHinting)
|
||||
((Library.Interface.ICompressionHinting)m_compression).LowOverheadMode = true;
|
||||
|
||||
AddManifestfile();
|
||||
AddManifestFile();
|
||||
}
|
||||
|
||||
protected void AddManifestfile()
|
||||
protected void AddManifestFile()
|
||||
{
|
||||
using (var sr = new StreamWriter(m_compression.CreateFile(MANIFEST_FILENAME, CompressionHint.Compressible, DateTime.UtcNow), ENCODING))
|
||||
sr.Write(ManifestData.GetManifestInstance(m_blocksize, m_blockhash, m_filehash));
|
||||
}
|
||||
|
||||
public void CreateFilesetFile(bool isFullBackup)
|
||||
{
|
||||
using (var sr = new StreamWriter(m_compression.CreateFile(FILESET_FILENAME, CompressionHint.Compressible, DateTime.UtcNow), ENCODING))
|
||||
{
|
||||
sr.Write(FilesetData.GetFilesetInstance(isFullBackup));
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
if (m_compression != null)
|
||||
|
||||
Reference in New Issue
Block a user